MCPcopy Create free account
hub / github.com/Snapchat/Valdi / getUserConfirmation

Function getUserConfirmation

npm_modules/cli/src/utils/cliUtils.ts:89–95  ·  view source on GitHub ↗
(promptMessage?: string, defaultConfirm: boolean = false)

Source from the content-addressed store, hash-verified

87}
88
89export async function getUserConfirmation(promptMessage?: string, defaultConfirm: boolean = false): Promise<boolean> {
90 const answer = await inquirer.prompt<{ confirm: boolean }>([
91 { type: 'confirm', name: 'confirm', message: promptMessage ?? 'Are you sure?', default: defaultConfirm },
92 ]);
93
94 return answer.confirm;
95}
96
97export function getScriptDirectory(): string {
98 return '';

Callers 4

maybeSetupPrettierFunction · 0.90
maybeSetupEslintFunction · 0.90
getShouldBootstrapFunction · 0.90
getProjectNameFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected