MCPcopy
hub / github.com/vercel/next.js / onPromptState

Function onPromptState

packages/create-next-app/index.ts:27–39  ·  view source on GitHub ↗
(state: {
  value: InitialReturnValue
  aborted: boolean
  exited: boolean
})

Source from the content-addressed store, hash-verified

25process.on('SIGTERM', handleSigTerm)
26
27const onPromptState = (state: {
28 value: InitialReturnValue
29 aborted: boolean
30 exited: boolean
31}) => {
32 if (state.aborted) {
33 // If we don't re-enable the terminal cursor before exiting
34 // the program, the cursor will remain hidden
35 process.stdout.write('\x1B[?25h')
36 process.stdout.write('\n')
37 process.exit(1)
38 }
39}
40
41const program = new Command(packageJson.name)
42 .version(

Callers

nothing calls this directly

Calls 2

writeMethod · 0.45
exitMethod · 0.45

Tested by

no test coverage detected