cpx icon indicating copy to clipboard operation
cpx copied to clipboard

Watch does not work when path contains parentheses

Open ghuser opened this issue 8 years ago • 2 comments

While the following works:

cpx.watch("/tmp/dir1/file1.xml", "/tmp/dir2", {initialCopy:false}, function(err){});

This doesn't:

cpx.watch("/tmp/dir1(copy)/file1.xml", "/tmp/dir2", {initialCopy:false}, function(err){});

Tested on Windows10 / Ubuntu. I even tried to escape like this: \( \) but it didn't work.

FYI: I've tested glob module separately (using default options) and it doesn't have any problems with parentheses in the above path.

ghuser avatar Mar 06 '17 13:03 ghuser

Thank you for this issue.

I confirmed it. If there are parentheses, cpx.copy works, but cpx.watch does not work.

mysticatea avatar Mar 06 '17 21:03 mysticatea

This bug is also present when using braces, as in styles/**/*.{css,scss}.

ivanjonas avatar Dec 08 '21 19:12 ivanjonas