You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 26, 2021. It is now read-only.
Currently only a failed argv parse will print the error and the short help. There ought to be a way for users to fail post-mortem using the same format.
For example:
const argv = neodoc.run(`usage: cp <from> <to>`);
if (!fs.existsSync(argv['<from>'])) {
neodoc.exit(`file does not exist: ${argv['<from>']}`);
}
should somehow print:
> ./cp some-file.txt
cp: file does not exist: some-file.txt
The only quirk here is that the program name needs to be known. So either it must be stored in argv, maybe as some reserved property and passed manually to neodoc.exit, or ... ?
The text was updated successfully, but these errors were encountered:
Currently only a failed argv parse will print the error and the short help. There ought to be a way for users to fail post-mortem using the same format.
For example:
should somehow print:
The only quirk here is that the program name needs to be known. So either it must be stored in
argv
, maybe as some reserved property and passed manually toneodoc.exit
, or ... ?The text was updated successfully, but these errors were encountered: