(question: string)
| 177 | if (isSecret) return generateSecret(); |
| 178 | return CI_PLACEHOLDER_VALUES[key] ?? defaultValue; |
| 179 | } |
| 180 | |
| 181 | // --------------------------------------------------------------------------- |
| 182 | // User interaction |
| 183 | // --------------------------------------------------------------------------- |
| 184 | |
| 185 | function confirm(question: string): Promise<boolean> { |
| 186 | const rl = readline.createInterface({ input: process.stdin, output: process.stdout }); |
| 187 | return new Promise(resolve => { |
| 188 | rl.question(question, answer => { |
| 189 | rl.close(); |
| 190 | resolve(answer.toLowerCase() === 'y' || answer.toLowerCase() === 'yes'); |
no test coverage detected