copyfiles
copyfiles copied to clipboard
Unquoted glob doesn't match correctly
This worked before:
src
folder 1
file1.ext
folder 2
file2.ext
script in package.json
: copyfiles -u 1 src/**/*.ext out
Then I added another file at the root level like this:
src
folder 1
file1.ext
folder 2
file2.ext
file3.ext
Now file1
and file2
were missing in the out
folder.
I had to change the npm script to use quotes. e.g.
"copy": "copyfiles -u 1 \"src/**/*.ext\" out"
I had this problem using Arch Linux and also inside of the Docker container using the basic node
image.
I think the README was a bit misleading when it said that on windows globs must be double quoted, everybody else can quote however they please.
copyfiles
itself didn't report any errors or warnings either.
Had this exact same issue, quoting my glob solved it. Thanks!