{"record":{"id":"fe233d5718fec5a4","repo":"Fission-AI/OpenSpec","slug":"path-is-not-writable-targetdir","errorCode":null,"errorMessage":"Path is not writable: ${targetDir}","messagePattern":"Path is not writable: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/core/completions/installers/fish-installer.ts","lineNumber":160,"sourceCode":"   * @returns Uninstallation result\n   */\n  async uninstall(options?: { yes?: boolean }): Promise<{ success: boolean; message: string }> {\n    try {\n      const targetPath = this.getInstallationPath();\n\n      // Check if installed\n      try {\n        await fs.access(targetPath);\n      } catch {\n        return {\n          success: false,\n          message: 'Completion script is not installed',\n        };\n      }\n\n      const targetDir = path.dirname(targetPath);\n      if (!(await FileSystemUtils.canWriteFile(targetDir))) {\n        throw new Error(`Path is not writable: ${targetDir}`);\n      }\n\n      // Remove the completion script\n      await fs.unlink(targetPath);\n\n      return {\n        success: true,\n        message: 'Completion script uninstalled successfully',\n      };\n    } catch (error) {\n      return {\n        success: false,\n        message: `Failed to uninstall completion script: ${error instanceof Error ? error.message : String(error)}`,\n      };\n    }\n  }\n}\n","sourceCodeStart":142,"sourceCodeEnd":178,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/core/completions/installers/fish-installer.ts#L142-L178","documentation":"Error \"Path is not writable: ${targetDir}\" thrown in Fission-AI/OpenSpec.","triggerScenarios":"Thrown at src/core/completions/installers/fish-installer.ts:160 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6926ccb18afa4ff621112813e9968334576ee11a","analyzedAt":"2026-08-25T12:29:45.729Z","schemaVersion":2},"datasetVersion":"2026-08-25T16:17:27.014Z"}