{"record":{"id":"edce6e63082b08a0","repo":"paperclipai/paperclip","slug":"refusing-to-remove-unverified-install-store-path","errorCode":null,"errorMessage":"Refusing to remove unverified install store ${paths.cliRoot}.","messagePattern":"Refusing to remove unverified install store (.+?)\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/install-store.ts","lineNumber":127,"sourceCode":"      ) {\n        throw writeError;\n      }\n    }\n  }\n}\n\nexport function assertManagedInstallStore(paths = resolveInstallStorePaths()): InstallManifest {\n  const cliStat = fs.lstatSync(paths.cliRoot);\n  if (!cliStat.isDirectory() || cliStat.isSymbolicLink()) {\n    throw new Error(`Refusing to remove unsafe install-store path ${paths.cliRoot}.`);\n  }\n  assertOwnedByCurrentUser(cliStat, paths.cliRoot);\n  let markerStat: fs.Stats;\n  try {\n    markerStat = fs.lstatSync(paths.markerPath);\n  } catch (error) {\n    if ((error as NodeJS.ErrnoException).code === \"ENOENT\") {\n      throw new Error(`Refusing to remove unverified install store ${paths.cliRoot}.`);\n    }\n    throw error;\n  }\n  if (!markerStat.isFile() || markerStat.isSymbolicLink() || markerStat.nlink > 1) {\n    throw new Error(`Refusing to remove unverified install store ${paths.cliRoot}.`);\n  }\n  assertOwnedByCurrentUser(markerStat, paths.markerPath);\n  if (fs.readFileSync(paths.markerPath, \"utf8\") !== MANAGED_STORE_MARKER) {\n    throw new Error(`Refusing to remove unverified install store ${paths.cliRoot}.`);\n  }\n  const manifest = readInstallManifest(paths);\n  if (!manifest) throw new Error(`Refusing to remove install store without a manifest at ${paths.cliRoot}.`);\n  const relativePayload = path.relative(paths.installsRoot, path.resolve(manifest.payloadPath));\n  if (!relativePayload || relativePayload.startsWith(\"..\") || path.isAbsolute(relativePayload)) {\n    throw new Error(`Refusing to remove install store with an invalid manifest at ${paths.cliRoot}.`);\n  }\n  return manifest;\n}","sourceCodeStart":109,"sourceCodeEnd":145,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/cli/src/install-store.ts#L109-L145","documentation":"The managed marker file is missing or is not a regular single-linked file, so the store cannot be verified as managed before removal; a pre-uninstall safety guard.","triggerScenarios":"Thrown at cli/src/install-store.ts:127 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the install store marker at ${paths.cliRoot} before removal.","Re-run removal against a store created by the managed installer."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}