{"record":{"id":"999ec1de78dc558d","repo":"paperclipai/paperclip","slug":"aborted","errorCode":null,"errorMessage":"Aborted.","messagePattern":"Aborted\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"info","filePath":"cli/src/commands/client/skills.ts","lineNumber":1019,"sourceCode":"\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":1001,"sourceCodeEnd":1025,"githubUrl":"https://github.com/paperclipai/paperclip/blob/67001ec6eb96ae601aa27bc91d9b2415d665334a/cli/src/commands/client/skills.ts#L1001-L1025","documentation":"Thrown by confirmDangerousAction() when the interactive prompt received an answer that is not exactly 'yes' (case-insensitive, trimmed). It is the user-driven cancellation path: the destructive action is aborted because confirmation was withheld. It exits with a non-zero code via handleCommandError.","triggerScenarios":"At the `Type yes to continue:` prompt for reset/remove/clear, the user types anything other than 'yes' (no, n, empty, or a typo) and presses enter.","commonSituations":"User changes their mind at the prompt, accidental enter key, or a wrapper that pipes a non-'yes' answer.","solutions":["If you intended to proceed, re-run and type exactly `yes` at the prompt.","If you intended to cancel, this is expected behavior — no action was taken.","For automation, pass --yes to skip the prompt entirely."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await run([\"skills\", \"remove\", ref]);\n} catch (err) {\n  if (err instanceof Error && err.message === \"Aborted.\") {\n    // user declined — exit gracefully without treating as a fault\n    process.exit(0);\n  }\n  throw err;\n}","preventionTips":["Treat 'Aborted.' as expected cancellation, not a hard error, in wrappers.","For non-interactive runs, pass --yes to skip the prompt entirely.","Type exactly 'yes' (case-insensitive) to confirm at the prompt."],"tags":["cli","confirmation","aborted","user-cancel","destructive"],"backgroundTag":null,"analyzedSha":"67001ec6eb96ae601aa27bc91d9b2415d665334a","analyzedAt":"2026-08-12T12:05:45.408Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}