File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ Read this in other languages: English | [简体中文](./Readme_zh-CN.md)
48
48
- [ createCommand()] ( #createcommand )
49
49
- [ Node options such as ` --harmony ` ] ( #node-options-such-as---harmony )
50
50
- [ Debugging stand-alone executable subcommands] ( #debugging-stand-alone-executable-subcommands )
51
+ - [ npm run-script] ( #npm-run-script )
51
52
- [ Display error] ( #display-error )
52
53
- [ Override exit and output handling] ( #override-exit-and-output-handling )
53
54
- [ Additional documentation] ( #additional-documentation )
@@ -1061,6 +1062,17 @@ the inspector port is incremented by 1 for the spawned subcommand.
1061
1062
1062
1063
If you are using VSCode to debug executable subcommands you need to set the ` "autoAttachChildProcesses": true ` flag in your launch.json configuration.
1063
1064
1065
+ ### npm run-script
1066
+
1067
+ By default when you call your program using run-script, ` npm ` will parse any options on the command-line and they will not reach your program. Use
1068
+ ` -- ` to stop the npm option parsing and pass through all the arguments.
1069
+
1070
+ The synopsis for [ npm run-script] ( https://docs.npmjs.com/cli/v9/commands/npm-run-script ) explicitly shows the ` -- ` for this reason:
1071
+
1072
+ ``` console
1073
+ npm run-script <command> [-- <args>]
1074
+ ```
1075
+
1064
1076
### Display error
1065
1077
1066
1078
This routine is available to invoke the Commander error handling for your own error conditions. (See also the next section about exit handling.)
You can’t perform that action at this time.
0 commit comments