Skip to content

Commit

Permalink
Improve multi-character short error
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowspawn committed Jan 12, 2025
1 parent a87e686 commit 466c105
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/option.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,9 @@ function splitOptionFlags(flags) {
if (/^-[^-][^-]/.test(unsupportedFlag))
throw new Error(
`${baseError}
- a short flag with a single dash may only have a single character
- use a single dash followed by a single character for a short flag
- or use a double dash with a longer name (and can have another long option, like '--ws, --workspace')`,
- a short flag is a single dash and a single character
- either use a single dash and a single character (for a short flag)
- or use a double dash for a long option (and can have two, like '--ws, --workspace')`,
);
if (shortFlagExp.test(unsupportedFlag))
throw new Error(`${baseError}
Expand Down

0 comments on commit 466c105

Please sign in to comment.