sindresorhus / cpy-cli

Copy files
MIT License
344 stars 33 forks source link

Broken after release on 2019-12-06 #22

Open weidox opened 4 years ago

weidox commented 4 years ago

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

sindresorhus commented 4 years ago

I think this was caused by https://github.com/sindresorhus/cpy/commit/c4014c0e79abbba7e8ce9c205dbeeab98221d347.

// @whitecrownclown

adriankremer commented 4 years ago

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

weidox commented 4 years ago

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.

Tarekajaj commented 4 years ago

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

oliverkan commented 4 years ago

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

kevincaradant commented 4 years ago

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 ? :)

oliverkan commented 4 years ago

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'

kevincaradant commented 4 years ago

@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 :)