mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-03-20 11:02:37 +08:00
Copy file into directory (#11)
* Copy file into directory * Add test and check if file exists before stating * Format
This commit is contained in:
@@ -267,6 +267,9 @@ async function move(
|
||||
|
||||
await copyDirectoryContents(source, dest, force, moveOptions.deleteOriginal)
|
||||
} else {
|
||||
if ((await ioUtil.exists(dest)) && (await ioUtil.isDirectory(dest))) {
|
||||
dest = path.join(dest, path.basename(source))
|
||||
}
|
||||
if (force) {
|
||||
await ioUtil.copyFile(source, dest)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user