node-sync-glob
node-sync-glob copied to clipboard
Spaces in source path?
Is there any way to have a space in the source path? For example:
sync-glob '../my stuff/src/shared/**/*' src/shared
fails at "../my"
@david-hollifield never tested a space case. Need to add test spec for that too.
"space case" LOL!
@david-hollifield
Did you try to escape the space?
Note: Double escape may be needed (so that one slash goes through the shell environment down to node...).
sync-glob '../my\\ stuff/src/shared/**/*' src/shared
@david-hollifield I just added a test at #50 Works for me locally, let's see how CI tests turn out to be... Though I really think you just need to escape stuff.
@david-hollifield Running the following commands in my CLI manually works too:
Space in source glob
node ./bin/sync-glob.js 'test/mock/foo space/*.txt' tmp/copy
DELETE tmp/copy COPY test/mock/foo space/a.txt to tmp/copy/a.txt COPY test/mock/foo space/b.txt to tmp/copy/b.txt
Space in source glob and target dir
node ./bin/sync-glob.js 'test/mock/foo space/*.txt' tmp/co\ py
DELETE tmp/co py COPY test/mock/foo space/a.txt to tmp/co py/a.txt COPY test/mock/foo space/b.txt to tmp/co py/b.txt
Relative Path with space
node ./bin/sync-glob.js '../node-sync-glob/test/mock/foo space/*.txt' tmp/co\ py2
DELETE tmp/co py2 COPY test/mock/foo space/a.txt to tmp/co py2/a.txt COPY test/mock/foo space/b.txt to tmp/co py2/b.txt
The CLI
Finder
@david-hollifield All checks passed at Linux, MacOS and windows for various node versions. Check out PR #50
Thanks for raising this question, it increased my test coverage:)
@AndyOGo I'm not sure what I'm doing wrong, but after updating to 1.3.8 and running with and without escaping the space I get the attached. Any ideas?
@david-hollifield Thanks for your detailed feedback. Well, that seems obviously to be a bug. I will add another test with nested stuff within a directory which contains spaces.
Then after chrismas I will track that one down. Thanks again for your welcome feedback. A merry xmas and a happy new year.
Any luck with this one?