Skip to content
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

cannot resolve main script if -r options specified, flag with value specified and main script file path contains only file name. #1691

Closed
develar opened this issue May 13, 2015 · 6 comments
Labels
confirmed-bug Issues with confirmed bugs.

Comments

@develar
Copy link

develar commented May 13, 2015

iojs --expose_debug_as=v8debug -r ./p.js file.js
module.js:339
    throw err;
          ^
Error: Cannot find module 'file.js'

Works correctly, if "--expose_debug_as=v8debug " is not specified.

Test project (files file.js and p.js) — https://dl.dropboxusercontent.com/u/43511007/s/test.zip

@yosuke-furukawa
Copy link
Member

Thank you for report.
the issue is reproduced on my environment.
I fixed the issue on my pull request. #1694

@Fishrock123 Fishrock123 added the confirmed-bug Issues with confirmed bugs. label May 13, 2015
@trevnorris
Copy link
Contributor

@iojs/tc Think we can make the command line parser more complete, or is there an existing one we can we can throw into deps/?

@bnoordhuis
Copy link
Member

@trevnorris It depends on what you need but in my own projects I frequently reuse getopt.c or getopt_long.c from the FreeBSD source tree. They build out-of-tree with only minor tweaks.

@trevnorris
Copy link
Contributor

@bnoordhuis Small and easy to include. I'd say we just use one of those for our arguments parsing instead.

@Fishrock123
Copy link
Contributor

+1 @bnoordhuis's suggestions if they look good, our options parsing is horrible.

Here's another options-related issue of which a fix could also benefit: #1197

yosuke-furukawa added a commit that referenced this issue May 15, 2015
Fixes: #1691
PR-URL: #1694
Reviewed-By: Ali Ijaz Sheikh <[email protected]>
Reviewed-By: Trevor Norris <[email protected]>
Reviewed-By: Jeremiah Senkpiel <[email protected]>
@Fishrock123
Copy link
Contributor

Fixed in 0a461e5 - will be in the imminent 2.0.2

Fishrock123 pushed a commit to Fishrock123/node that referenced this issue May 19, 2015
Fixes: nodejs#1691
PR-URL: nodejs#1694
Reviewed-By: Ali Ijaz Sheikh <[email protected]>
Reviewed-By: Trevor Norris <[email protected]>
Reviewed-By: Jeremiah Senkpiel <[email protected]>
andrewdeandrade pushed a commit to andrewdeandrade/node that referenced this issue Jun 3, 2015
Fixes: nodejs/node#1691
PR-URL: nodejs/node#1694
Reviewed-By: Ali Ijaz Sheikh <[email protected]>
Reviewed-By: Trevor Norris <[email protected]>
Reviewed-By: Jeremiah Senkpiel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed-bug Issues with confirmed bugs.
Projects
None yet
Development

No branches or pull requests

5 participants