-
-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cwd ignored when copying files #107
Comments
Files from source directory are copied but to themselves (into their locations in source directory) instead of into dest directory. I had to work it around by prefixing patterns with the source directory like this:
to
|
I am experiencing the same bug with |
Ah, I debugged Line 113 in 38c5d85
I managed to create a minimal repro using the low-level NodeJS Assuming my CWD is
=> Now assuming my CWD is
-(notice the missing UPDATE: Line 270 in 38c5d85
In concrete terms, this fails in my project:
... whereas this succeeds:
|
Ah, it's a regression / breaking change in https://github.com/sindresorhus/cp-file/blob/v10.0.0/index.js#L77-L79 https://github.com/sindresorhus/cp-file/blob/v10.0.0/index.js#L104-L111 vs. https://github.com/sindresorhus/cp-file/blob/v9.1.0/index.js#L57-L60 https://github.com/sindresorhus/cp-file/blob/v9.1.0/index.js#L90-L93 Note the added code:
See PR: |
My workaround / temporary fix is: add
For now I just use a
|
I recently migrated to the newer
v9.0.1
& updated some code as per: https://github.com/sindresorhus/cpy/releases/tag/v9.0.0I'm trying to copy the
test
directory to some other temporary directory but only theindex.js
file gets copied directly without being under thetest
directory.I've created a minimal reproduction here: https://github.com/KK-Learning-Gym/cpy-path-err.
Relevant lines are here: https://github.com/KK-Learning-Gym/cpy-path-err/blob/2140c4814dbf905d2bb6ed03354323fe22a69c12/index.mjs#L12-L20
I was trying to debug this a little bit. It seems like the
cwd
isn't considered under theif (path.isAbsolute(destination))
here:cpy/index.js
Lines 96 to 98 in 15f9557
The text was updated successfully, but these errors were encountered: