{"record":{"id":"11131daabd773e19","repo":"paperclipai/paperclip","slug":"refusing-to-use-unrecognized-install-store-paths","errorCode":null,"errorMessage":"Refusing to use unrecognized install store ${paths.cliRoot}.","messagePattern":"Refusing to use unrecognized install store (.+?)\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/install-store.ts","lineNumber":99,"sourceCode":"    manifestPath: path.join(cliRoot, \"install.json\"),\n    markerPath: path.join(cliRoot, \".managed-install\"),\n    lockPath: path.join(cliRoot, \".install.lock\"),\n    currentPath: path.join(cliRoot, \"current\"),\n    shimPath: path.join(homeDir, \".local\", \"bin\", \"paperclipai\"),\n  };\n}\n\nexport function initializeInstallStore(paths = resolveInstallStorePaths()): void {\n  ensurePrivateDirectory(paths.cliRoot);\n  ensurePrivateDirectory(paths.installsRoot);\n  try {\n    const markerStat = fs.lstatSync(paths.markerPath);\n    if (!markerStat.isFile() || markerStat.isSymbolicLink() || markerStat.nlink > 1) {\n      throw new Error(`Refusing to use unsafe install-store marker ${paths.markerPath}.`);\n    }\n    assertOwnedByCurrentUser(markerStat, paths.markerPath);\n    if (fs.readFileSync(paths.markerPath, \"utf8\") !== MANAGED_STORE_MARKER) {\n      throw new Error(`Refusing to use unrecognized install store ${paths.cliRoot}.`);\n    }\n  } catch (error) {\n    if ((error as NodeJS.ErrnoException).code !== \"ENOENT\") throw error;\n    try {\n      fs.writeFileSync(paths.markerPath, MANAGED_STORE_MARKER, { mode: 0o600, flag: \"wx\" });\n    } catch (writeError) {\n      if (\n        (writeError as NodeJS.ErrnoException).code !== \"EEXIST\" ||\n        fs.readFileSync(paths.markerPath, \"utf8\") !== MANAGED_STORE_MARKER\n      ) {\n        throw writeError;\n      }\n    }\n  }\n}\n\nexport function assertManagedInstallStore(paths = resolveInstallStorePaths()): InstallManifest {\n  const cliStat = fs.lstatSync(paths.cliRoot);","sourceCodeStart":81,"sourceCodeEnd":117,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/cli/src/install-store.ts#L81-L117","documentation":"The install store directory exists but its marker file is missing or does not contain the expected managed-store marker content, so it is not a recognized Paperclip install store.","triggerScenarios":"Thrown at cli/src/install-store.ts:99 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify ${paths.cliRoot} is a Paperclip-managed install store (contains the expected marker).","Install via the managed installer instead of pointing at an arbitrary directory."],"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"}