Open rrthomas opened 3 years ago
So far the only workaround I've found is to use '"-"'
as the argument. This preserves it as a positional argument.
This may be an issue in yargs rather than yargs-parser. There is a test that dash is supported as a positional in yargs-parser: https://github.com/yargs/yargs-parser/blob/3aba24ceaa1a06ceb982c63a06002526d781e826/test/yargs-parser.cjs#L1496
This is with yargs v16.0.1.
Sample code in
test.js
:Test:
This is unfortunate, as using
-
as a filename to meanstdin
orstdout
is a common convention.