MCPcopy Create free account
hub / github.com/code-forge-io/react-router-devtools / confirmRun

Function confirmRun

docs/scripts/setup.ts:27–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25
26// Helper method used to confirm the run
27const confirmRun = async () => {
28 const { envName } = getEnvInfo()
29 log(`About to execute the command in ${chalk.bold.red(envName)} environment.`)
30
31 const { sure } = await prompt.get([
32 {
33 name: "sure",
34 description: "Are you sure? (y/n)",
35 type: "string",
36 required: true,
37 },
38 ])
39
40 if (sure !== "y") {
41 log(chalk.bold.red("Command aborted!\n"))
42 process.exit(1)
43 }
44}
45
46if (!process.argv[2]) {
47 chalk.red("Missing command to run argument")

Callers 1

setup.tsFile · 0.85

Calls 2

getEnvInfoFunction · 0.85
logFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…