You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// If dest is an existing directory, should copy inside.
constnewDest: string=
destStat&&destStat.isDirectory()
? path.join(dest,path.basename(source))
: dest
The files/folders in the source directory get copied into another folder (the basename of the source path) inside the target directory.
For example, I want to copy the directory .github/ISSUE_TEMPLATE/ to issues/. With the current version of @actions/io the files will end up in issues/ISSUE_TEMPLATE instead of issues/ if issues/ already exists.
Describe the enhancement
Add an option to disable this behavior and copy all files from one directory into the other without creating the basename folder.
Current implementation/problem
I want to copy the contents of a directory into another existing directory. Right now, because of these lines:
toolkit/packages/io/src/io.ts
Lines 47 to 51 in 4dd900d
The files/folders in the source directory get copied into another folder (the basename of the source path) inside the target directory.
For example, I want to copy the directory
.github/ISSUE_TEMPLATE/
toissues/
. With the current version of@actions/io
the files will end up inissues/ISSUE_TEMPLATE
instead ofissues/
ifissues/
already exists.Describe the enhancement
Add an option to disable this behavior and copy all files from one directory into the other without creating the basename folder.
Code Snippet
Additional information
If there's another way of achieving this, please let me know. If not, I would be willing to create a PR for this.
The text was updated successfully, but these errors were encountered: