diff --git a/action/dist/index.js b/action/dist/index.js index d453fdc..964bf28 100644 --- a/action/dist/index.js +++ b/action/dist/index.js @@ -12305,11 +12305,9 @@ const main = async ({ env = process.env, log, }) => { // Make sure the destination folder exists await (0, io_1.mkdirP)(path.resolve(REPO_TEMP, destinationFolder)); log.log(`##[info] Copying all files from ${folder}`); - // TODO: replace this copy with a node implementation - await (0, exports.exec)(`cp -rT "${folder}"/ ${destinationFolder}`, { - log, - env: childEnv, - cwd: REPO_TEMP, + await (0, io_1.cp)(`${folder}/`, `${REPO_TEMP}/${destinationFolder}/`, { + recursive: true, + copySourceDirectory: false, }); await (0, exports.exec)(`git add -A .`, { log, env: childEnv, cwd: REPO_TEMP }); const message = config.message diff --git a/action/src/index.ts b/action/src/index.ts index de95f11..b1a6471 100644 --- a/action/src/index.ts +++ b/action/src/index.ts @@ -5,7 +5,7 @@ import gitUrlParse from 'git-url-parse'; import { homedir, tmpdir } from 'os'; import * as path from 'path'; import git from 'isomorphic-git'; -import { mkdirP } from '@actions/io'; +import { mkdirP, cp } from '@actions/io'; export type Console = { readonly log: (...msg: unknown[]) => void; @@ -579,11 +579,9 @@ export const main = async ({ await mkdirP(path.resolve(REPO_TEMP, destinationFolder)); log.log(`##[info] Copying all files from ${folder}`); - // TODO: replace this copy with a node implementation - await exec(`cp -rT "${folder}"/ ${destinationFolder}`, { - log, - env: childEnv, - cwd: REPO_TEMP, + await cp(`${folder}/`, `${REPO_TEMP}/${destinationFolder}/`, { + recursive: true, + copySourceDirectory: false, }); await exec(`git add -A .`, { log, env: childEnv, cwd: REPO_TEMP }); const message = config.message