option for ignore error if not found files
Closed this issue · 5 comments
alexander-akait commented
I run.
cpy 'public/**/*.*' '../build/' --cwd=src --parents
Output:
Cannot glob `public/**/*.*,!**/*-src.*`: Cannot copy from `/path/to/src/public/**/*.*` to `/path/to/build/public/**/*.*`: cannot read from `/path/to/public/**/*.*`: ENOENT: no such file or directory, open '/path/to/src/public/**/*.*'
schnittstabil commented
@evilebottnawi Hmm, what exactly bothers you? The message, the exit code or both? – Can you give us some context, why this feature is useful for you?
alexander-akait commented
@schnittstabil exit code, i use CI and get build failed.
schnittstabil commented
You may try || true
, which is perhaps not platform independent, though:
cpy 'public/**/*.*' '../build/' --cwd=src --parents || true
alexander-akait commented
@schnittstabil thanks
schnittstabil commented
The double pipe (||
) is supported by windows, but not the true
command afaik.
For package.json/"scripts"
use cases you may install a cross-platform implementation, e.g. cash-true:
npm install --save-dev cash-true