-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
flag does not work
#35
Comments
Does it work if you remove |
// @andy2mrqz |
Strangely no: it encounters an error trying to copy a file from the |
I face the same issue. 4.x is not working for me anymore. Had to rollback to 3.x |
@sindresorhus thanks for tagging, I totally missed the notifications and didn't see this until now. I inspected #34 to see if that could have introduced a regression. The areas that my PR touched were:
I think the regression may have been introduced in cpy v9, which this package proxies to, in sindresorhus/cpy#92. The most recent comment as of writing mentions an issue very similar to this one. I also was able to recreate this issue by creating a simple repo with Sometime in the coming days/weeks I'll spend some time and see if I can resolve the issue in cpy - but the main blockers there are time and my lack of familiarity with cpy internals. Anyone else interested should feel free to jump in and contribute as well, if able. |
Hi there, The current behavior i see is, that glob patterns must start with a posix path segment:
Possible fix could be
|
Just managed to fix this in my setup and i saw actually 1 issue and 1 breaking change:
|
Not sure if it is related or if I should open another ticket, but with 5.0.0 |
with 5.0.0 don't work '--cwd' |
@sindresorhus would be nice to have some feedback on this. I have been stuck on 3.x because of this. Hope you can look at it |
As I can see, the If removed from The example with # with this project tree:
# .
# └── src
# ├── a.file
# └── subdirectory
# └── another.file
cpy . '../../dist' --cwd=src
# should produce:
# .
# ├── dist
# │ ├── a.file
# │ └── subdirectory
# │ └── another.file
# └── src
# ├── a.file
# └── subdirectory
# └── another.file
Let's say you want to copy the contents from # this would be the expected destination path, if the initial example was correct
cpy . '../../dist' --cwd=src/subdirectory
# ... but, in order to get it to work, you need to add the relative path _TWICE_.
cpy . '../../../../dist' --cwd=src/subdirectory |
This update necessitates a change to the relative filepath of the destination folder. The relative path apparently needs to be referenced twice, as per this open issue: sindresorhus/cpy-cli#35 (comment)
This update necessitates a change to the relative filepath of the destination folder. The relative path apparently needs to be referenced twice, as per this open issue: sindresorhus/cpy-cli#35 (comment)
This update necessitates a change to the relative filepath of the destination folder. The relative path apparently needs to be referenced twice, as per this open issue: sindresorhus/cpy-cli#35 (comment)
Previously I was executing the following command with 3.1.x
with a result similar to:
However, the 4.0 release doesn't find any files to copy. This seems like a globbing problem.
The text was updated successfully, but these errors were encountered: