{"record":{"id":"3543dba3cb705147","repo":"upstash/context7","slug":"installation-cancelled","errorCode":null,"errorMessage":"Installation cancelled","messagePattern":"Installation cancelled","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"packages/cli/src/commands/skill.ts","lineNumber":386,"sourceCode":"        headerPad + pc.dim(\"Popularity\".padEnd(popularityColWidth)) + pc.dim(\"Trust\");\n\n      try {\n        selectedSkills = await checkboxWithHover({\n          message: `Select skills to install:\\n${headerLine}`,\n          choices,\n          pageSize: 15,\n          loop: false,\n          theme: {\n            style: {\n              message: (text: string, status: string) => {\n                if (status === \"done\") return pc.dim(text.split(\"\\n\")[0]);\n                return pc.bold(text);\n              },\n            },\n          },\n        });\n      } catch {\n        log.warn(\"Installation cancelled\");\n        return;\n      }\n    }\n  }\n\n  if (selectedSkills.length === 0) {\n    log.warn(\"No skills selected\");\n    return;\n  }\n\n  const targets = await promptForInstallTargets(options);\n  if (!targets) {\n    log.warn(\"Installation cancelled\");\n    return;\n  }\n\n  const targetDirs = getTargetDirs(targets);\n","sourceCodeStart":368,"sourceCodeEnd":404,"githubUrl":"https://github.com/upstash/context7/blob/5284672feb575908efead6fcf1b5e542f8d607bb/packages/cli/src/commands/skill.ts#L368-L404","documentation":"The catch block around the skill multi-select prompt shown when installing from a repository that has more than one skill and neither --all was passed nor only one skill existed. @inquirer checkbox prompts throw ExitPromptError on Ctrl+C/Esc; the CLI maps any throw to 'Installation cancelled' and returns without installing.","triggerScenarios":"Pressing Ctrl+C or Esc at the 'select skills to install' checkbox; an empty checkbox submission is handled separately ('No skills selected'), so this warning specifically means the prompt threw.","commonSituations":"User browses a repo's skills then bails; non-interactive shell where the checkbox prompt cannot render; accidental Esc during selection.","solutions":["Re-run and select skills, or use `--all` to install every skill in the repo without the prompt.","Name the skill directly: `context7 skill add <repo> <skill>` bypasses the multi-select.","Ensure an interactive TTY when you want the selection UI."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if (!process.stdin.isTTY) {\n  console.error(\"Interactive skill selection requires a TTY; pass --all or name the skill explicitly.\");\n  process.exit(1);\n}","typeGuard":"function isPromptAbort(err: unknown): boolean {\n  return err instanceof Error && err.name === \"ExitPromptError\";\n}","tryCatchPattern":"try {\n  selectedSkills = await checkbox<Skill>({ message: \"Select skills\", choices });\n} catch (err) {\n  if (isPromptAbort(err)) {\n    log.warn(\"Installation cancelled\");\n    return;\n  }\n  throw err;\n}","preventionTips":["Use --all or `skill add <repo> <name>` to avoid the multi-select entirely.","Only catch ExitPromptError; rethrow other errors so render bugs are visible.","Check for a TTY before showing checkbox prompts."],"tags":["cli","skills","interactive-prompt","user-cancel"],"backgroundTag":"prompt-cancelled-by-user","analyzedSha":"5284672feb575908efead6fcf1b5e542f8d607bb","analyzedAt":"2026-08-18T18:00:18.510Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}