sindresorhus/cpy-cli

Broken after release on 2019-12-06

Opened this issue · 8 comments

Source as just plain dot does not work anymore. Was forced to replace with "**". Not sure if any other formats could be broken.

I think this was caused by sindresorhus/cpy@c4014c0.

// @whitecrownclown

Don't know if it is the same problem but since today our copyjobs permanently fail with "Cannot copy xxx: the file doesn't exist" by executing npx cpy-cli --parents ../parent-folder/sub-folder folder/sub-folder

adriankremer - yes it's the same issue. As I was investigating I saw it not working for folders the way you're using but was not sure if it was working before as I was only using dot with --cwd.

Copying all files in folder is not working any more
cpy './fonts/*.*' './src/fonts/'
throws the file doesn't exist

Hi all,
is there any update/solution for this issue?

Hi guys

This libs works well for me ;)

This is my example to clarify this point: cpy src/main/resources/conf/html/* dist/html

Of course the folder dist and html should already exists otherwise do mkdir dist/html to create them ;)

NB: I got your error the file doesn't exist when I don't specify the files that I want using * after src/main/resources/conf/html/, did you forget it ? :)

Hi, I am not sure which operating system you have but in windows it doesn't copy sub-folders. It just copies files which have extensions. When i want to give source parameter without '*' character this time library gives error as 'file not exist'

@oliverkan ,

I'm using WIndows ;)
src/main/resources/conf/html/* and src/main/resources/conf/html do the same thing normally ;)
If you want take files and subfolders you have to write something like : src/main/resources/conf/html/**/* or src/main/resources/conf/html/**/*.html

And maybe add this following parameter to keep the structure --parents

However it's the first time, that I use this lib and when I used this parameter: --cwd=src, I got the same issue as you and I don't know why yet, maybe it's the issue :)