* Formats the invalid flag or argument value with the expected input. * * @since 4.0.0
()
| 397 | * @since 4.0.0 |
| 398 | */ |
| 399 | override get message() { |
| 400 | const expectation = this.expected.startsWith("Expected ") || this.expected.startsWith("Expected:") |
| 401 | ? this.expected |
| 402 | : `Expected: ${this.expected}` |
| 403 | if (this.kind === "argument") { |
| 404 | return `Invalid value for argument <${this.option}>: "${this.value}". ${expectation}` |
| 405 | } |
| 406 | if (this.value.length === 0) { |
| 407 | return `Missing value for flag --${this.option}. ${expectation}` |
| 408 | } |
| 409 | return `Invalid value for flag --${this.option}: "${this.value}". ${expectation}` |
| 410 | } |
| 411 | } |
| 412 | |
| 413 | /** |
nothing calls this directly
no outgoing calls
no test coverage detected