* Parse `argv`, setting options and invoking commands when defined. * * Call with no parameters to parse `process.argv`. Detects Electron and special node options like `node --eval`. Easy mode! * * Or call with an array of strings to parse, and optionally where the user arguments start b
(argv, parseOptions)
| 1108 | */ |
| 1109 | |
| 1110 | async parseAsync(argv, parseOptions) { |
| 1111 | this._prepareForParse(); |
| 1112 | const userArgs = this._prepareUserArgs(argv, parseOptions); |
| 1113 | await this._parseCommand([], userArgs); |
| 1114 | |
| 1115 | return this; |
| 1116 | } |
| 1117 | |
| 1118 | _prepareForParse() { |
| 1119 | // Save the state the first time, then restore the state before each subsequent parse. |
no test coverage detected