Commit 2ff5cb1
doc,test: clarify --eval syntax for leading '-' scripts
If the script passed to --eval starts with a hyphen, the CLI parser
treats it as another option flag. Document the --eval=<script> form
as the workaround and add tests for --eval=-42, --eval=-0, and the
-e -p missing-argument error.
Co-authored-by: jorge guerrero <grrr.jrg@gmail.com>
Refs: #43397
Refs: #61962
PR-URL: #62244
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>1 parent 2000cac commit 2ff5cb1Copy full SHA for 2ff5cb1
2 files changed
+23Lines changed: 23 additions & 0 deletions
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- doc/api
- test/parallel
Expand file treeCollapse file tree
Open diff view settings
Collapse file
+3Lines changed: 3 additions & 0 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
989 | 989 | |
990 | 990 | |
991 | 991 | |
| 992 | + |
| 993 | + |
| 994 | + |
992 | 995 | |
993 | 996 | |
994 | 997 | |
|
Collapse file
test/parallel/test-cli-eval.js
Copy file name to clipboardExpand all lines: test/parallel/test-cli-eval.js+20Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
115 | 115 | |
116 | 116 | |
117 | 117 | |
| 118 | + |
| 119 | + |
| 120 | + |
| 121 | + |
| 122 | + |
| 123 | + |
| 124 | + |
| 125 | + |
| 126 | + |
| 127 | + |
| 128 | + |
| 129 | + |
| 130 | + |
| 131 | + |
| 132 | + |
| 133 | + |
| 134 | + |
| 135 | + |
| 136 | + |
| 137 | + |
118 | 138 | |
119 | 139 | |
120 | 140 | |
|
0 commit comments