-
Notifications
You must be signed in to change notification settings - Fork 261
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
Arguments are passed incorrectly when using coffee script #49
Comments
Hmm, if I understand correctly it's a question of setting the arguments against Right now, it's possible to do this like so:
Or, it would be possible except for a bug that's inserting a comma for some reason. I realize this is somewhat awkward syntax. I'm open to suggestions for better ways to do it. |
Thanks for the tip! Despite printing out
it somehow works :) However, I'm using foreman to run the app and it doesn't like this syntax, because it fails with:
Anyway, I think you're right about node options vs application options. I'm not sure about the comma bug you mentioned, but I guess that it's just displayed incorrectly - in supervisor.js#152 there's the following line: util.debug("Starting child process with '" + exec + " " + prog + " " + args + "'"); that converts util.debug("Starting child process with '" + exec + " " + prog + " " + args.join(" ") + "'"); |
Ah, cool. So I'll consider this an issue that has a workaround, but could definitely benefit from a friendlier solution. That's weird that foreman is choking on it. You're running from a Procfile, I assume? You could ask them if that's intended behavior. |
Hi, thank for the tip. I works well excepted that launching supervisor -e "coffee|node|js" -x coffee -- --nodejs --debug app.coffee hangs when I modify one of the application files. I got the message |
Hmm, interesting. It looks like somehow coffeescript or the |
I had another think about this. Here's my new idea, lemme know how this feels: we could offer a wildcard flag, supervisor --x-debug-brk server.js #=> node --debug-brk server.js supervisor --x-node-debug-brk server.coffee #=> coffee --node-debug-brk server.coffee I'm thinking it would either be |
not sure if this is still an issue but i was able to get going on windows without modifying supervisor code via the cli-wrapper.js
the first line is just to start the node-inspector |
Will track future progress on options in #123. |
Hi,
there's the following code in supervisor.js#155:
The issue with it is that coffee script expects options first and then script name:
while the code above provides script name first (
prog
) and then options (args
).Changing the line above to:
solves the issue and allows to run node js with debugger enabled like this:
supervisor -- app.coffee --nodejs --debug
If the order in which script name and arguments should be passed depends on executable, maybe it would be possible to add an option for that (e.g.
--options-first
), which forcoffee
would be set by default.I can write a patch for that if anybody else thinks it's a good idea :)
The text was updated successfully, but these errors were encountered: