(questionId: string, preference: string)
| 53 | } |
| 54 | |
| 55 | function writeGlobalPref(questionId: string, preference: string): void { |
| 56 | const f = path.join(stateRoot, 'global-question-preferences.json'); |
| 57 | let prefs: Record<string, string> = {}; |
| 58 | if (fs.existsSync(f)) prefs = JSON.parse(fs.readFileSync(f, 'utf-8')); |
| 59 | prefs[questionId] = preference; |
| 60 | fs.writeFileSync(f, JSON.stringify(prefs, null, 2)); |
| 61 | } |
| 62 | |
| 63 | function runHook(stdin: object, cwd?: string, extraEnv?: Record<string, string>): { |
| 64 | stdout: string; |
no outgoing calls
no test coverage detected