-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add filter for Windowe #174
base: master
Are you sure you want to change the base?
Conversation
when we run nprr or nprr Something, we get the error: "Error: No scripts available" this is caused by the "parse-cmd.js" script which in the "params" variable contains in my case 2 system links: C:\\Program Files\\nodejs\\node.exe C:\\Users\\USERNAME\\AppData\\Roaming\\npm\\node_modules\\nprr\\src\\bin.js when the script looks in the script names of the pakage.json it looks for the first element here C:\\Program Files\\nodejs\\node.exe which results in the error. So I added a filter that checks if the elements of "params" start with "[a-zA-Z]:\", to remove them. the modification has no impact on other OS than Windwos, I test if it is Windows if not it is to be ignored
Hey @Michael-RealT !! Thank you for the PR!! It's all nice, could you please enrich the comment left in the code? Essentially, moving most of the description of the PR to the What do you think? |
Hello, not sure to understand how and what you want to put in the script as a comment. I suggest that you add what you think is useful, English is not a language that I master, the text will therefore be clearer from you, what do you think? |
Hey Michael! Sorry for taking so long!! Sure, I'll do that! Just one question, so be completely sure I can add the correct tests: |
Merge pull request #1 from Michael-RealT/patch-1
when we run nprr or nprr Something, we get the error: "Error: No scripts available"
this is caused by the "parse-cmd.js" script which in the "params" variable contains in my case 2 system links:
C:\Program Files\nodejs\node.exe
C:\Users\USERNAME\AppData\Roaming\npm\node_modules\nprr\src\bin.js
when the script looks in the script names of the pakage.json it looks for the first element here C:\Program Files\nodejs\node.exe which results in the error.
So I added a filter that checks if the elements of "params" start with "[a-zA-Z]:", to remove them.
the modification has no impact on other OS than Windwos, I test if it is Windows if not it is to be ignored