-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Glob expansion in --command #8
Comments
Oh, also, the silly workaround obviously won't expand the glob again when the command is re-invoked. |
Yeah this is an annoying problem, the current workaround is to move your commands to a .sh script or to a separate npm scripts task. So in other words, to delegate the shell magic to other tools like npm or bash. Related to this issue: https://github.com/kimmobrunfeldt/chokidar-cli/issues/6 I would like to fix this so that this library would also support the basic shell features like globbing etc. Do you know some library which would correctly support these bash features? I need to get streaming stdout and stderr of the spawned processes so that the output can be correctly printed. That's why I ended up using spawn function. |
Can you just spawn an instance of whatever's at I think the expectation invariably is that if you can run some command in your shell, putting the same command into |
That sounds like a good approach, I'll try at some point |
Just writing this down so I won't forget: whatever the solution will be - it has to work on windows too since I'm promising cross platform support. |
Fix released in 1.0.1. Now the system's shell is taken from environment variable. See the solution here: https://github.com/kimmobrunfeldt/chokidar-cli/blob/master/utils.js#L6 Does this seem robust enough @jareware? I tested it with Windows 8, Ubuntu 12.04 and OS X 10.9.5. I didn't find good documentation of what would be the best env variable to find out the shell path in Windows. |
Thanks for your work on the project, it's been really useful!
One hitch I ran into lately was that run doesn't spawn a shell, so when you compare:
with
the results may not be what you expect.
I'm working around that with a simple
--command "cat $(ls *.js)"
, but it looks a bit... silly.The text was updated successfully, but these errors were encountered: