(option)
| 2103 | }; |
| 2104 | |
| 2105 | const getErrorMessage = (option) => { |
| 2106 | const bestOption = findBestOptionFromValue(option); |
| 2107 | const optionKey = bestOption.attributeName(); |
| 2108 | const source = this.getOptionValueSource(optionKey); |
| 2109 | if (source === 'env') { |
| 2110 | return `environment variable '${bestOption.envVar}'`; |
| 2111 | } |
| 2112 | return `option '${bestOption.flags}'`; |
| 2113 | }; |
| 2114 | |
| 2115 | const message = `error: ${getErrorMessage(option)} cannot be used with ${getErrorMessage(conflictingOption)}`; |
| 2116 | this.error(message, { code: 'commander.conflictingOption' }); |
nothing calls this directly
no test coverage detected