{"record":{"id":"e2d91de2ecb45427","repo":"Fission-AI/OpenSpec","slug":"path-is-not-writable-profilepath","errorCode":null,"errorMessage":"Path is not writable: ${profilePath}","messagePattern":"Path is not writable: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/core/completions/installers/powershell-installer.ts","lineNumber":201,"sourceCode":"    const profilePaths = this.getAllProfilePaths();\n    let anyConfigured = false;\n\n    for (const profilePath of profilePaths) {\n      try {\n        const profileDir = path.dirname(profilePath);\n        let profileExists = false;\n        try {\n          await fs.access(profilePath);\n          profileExists = true;\n        } catch (err: any) {\n          if (err?.code !== 'ENOENT') {\n            throw err;\n          }\n        }\n\n        if (!profileExists) {\n          if (!(await FileSystemUtils.canWriteFile(profilePath))) {\n            throw new Error(`Path is not writable: ${profilePath}`);\n          }\n          await fs.mkdir(profileDir, { recursive: true });\n        }\n\n        let profileContent = '';\n        let fileEncoding: BufferEncoding = 'utf-8';\n        let fileBom: Buffer = Buffer.alloc(0);\n        try {\n          const file = await this.readProfileFile(profilePath);\n          profileContent = file.content;\n          fileEncoding = file.encoding;\n          fileBom = file.bom;\n        } catch (err: any) {\n          // If the file doesn't exist that's fine — we'll create it as UTF-8.\n          // Any other read error (permissions, unsupported encoding, etc.) → skip this profile.\n          if (err?.code === 'ENOENT') {\n            // keep defaults\n          } else {","sourceCodeStart":183,"sourceCodeEnd":219,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/core/completions/installers/powershell-installer.ts#L183-L219","documentation":"Error \"Path is not writable: ${profilePath}\" thrown in Fission-AI/OpenSpec.","triggerScenarios":"Thrown at src/core/completions/installers/powershell-installer.ts:201 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"}