{"record":{"id":"2cd014c9761f5df4","repo":"Fission-AI/OpenSpec","slug":"path-is-not-writable-targetdir-2cd014","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/powershell-installer.ts","lineNumber":446,"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      // Remove profile configuration\n      await this.removeProfileConfig();\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    }","sourceCodeStart":428,"sourceCodeEnd":464,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/core/completions/installers/powershell-installer.ts#L428-L464","documentation":"Error \"Path is not writable: ${targetDir}\" thrown in Fission-AI/OpenSpec.","triggerScenarios":"Thrown at src/core/completions/installers/powershell-installer.ts:446 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"}