-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Set process.execPath
correctly when running .coffee files
#1307
Conversation
Related: #1303 set `process.argv[0]` to `coffee`. This makes `process.execPath` consistent with that change.
I'm for fixing it, but I believe there are better fixes than changing |
Great idea! I was unaware of |
Before you commit to that, make sure |
None of those alternatives are documented in Node's public API, so I think this is fine for now. |
|
|
It is before we rewrite it. ( [ 'node', '/home/michael/projects/coffee-script/bin/coffee', '/home/michael/test.coffee' ] [ 'coffee', '/home/michael/test.coffee' ] which happens at the current line 68, the line I suggested we add the fix above... above. edit: various inline edits |
That works too. For the record, |
Thanks for asking ... moved to |
Issue #1303 set
process.argv[0]
tocoffee
. However,process.execPath
still gives the absolute path ofnode
, notcoffee
. This patch corrects that by using the value of__filename
fromcoffee
asprocess.execPath
when running a.coffee
file.