{"record":{"id":"9f652ff5c00f26b9","repo":"paperclipai/paperclip","slug":"this-command-requires-yes-when-not-running-in-an","errorCode":null,"errorMessage":"This command requires --yes when not running in an interactive terminal.","messagePattern":"This command requires --yes when not running in an interactive terminal\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/src/commands/client/skills.ts","lineNumber":1013,"sourceCode":"async function readBodyFile(filePath: string): Promise<string> {\n  if (filePath === \"-\") {\n    return readStdin();\n  }\n  return readFile(filePath, \"utf8\");\n}\n\nasync function readStdin(): Promise<string> {\n  const chunks: Buffer[] = [];\n  for await (const chunk of process.stdin) {\n    chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(String(chunk)));\n  }\n  return Buffer.concat(chunks).toString(\"utf8\");\n}\n\nasync function confirmDangerousAction(yes: boolean | undefined, message: string): Promise<void> {\n  if (yes) return;\n  if (!process.stdin.isTTY || !process.stdout.isTTY) {\n    throw new Error(\"This command requires --yes when not running in an interactive terminal.\");\n  }\n  const rl = createInterface({ input, output });\n  try {\n    const answer = (await rl.question(`${message} Type yes to continue: `)).trim().toLowerCase();\n    if (answer !== \"yes\") {\n      throw new Error(\"Aborted.\");\n    }\n  } finally {\n    rl.close();\n  }\n}\n","sourceCodeStart":995,"sourceCodeEnd":1025,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/cli/src/commands/client/skills.ts#L995-L1025","documentation":"confirmDangerousAction needs a TTY to ask its yes/no confirmation; without --yes in a non-interactive terminal the destructive action is refused outright.","triggerScenarios":"Thrown at cli/src/commands/client/skills.ts:1013 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-run with --yes in non-interactive environments, or run interactively to confirm."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}