{"record":{"id":"ba1331c56dea125e","repo":"stablyai/orca","slug":"result-detail-no-path-changes-were-made","errorCode":null,"errorMessage":"${result.detail} No PATH changes were made.","messagePattern":"(.+?) No PATH changes were made\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/main/cli/cli-installer.ts","lineNumber":875,"sourceCode":"      (entry) =>\n        !samePathEntry('win32', entry, pathDirectory, this.windowsEnvironment, current.expandable)\n    )\n    if (nextEntries.length === entries.length) {\n      return\n    }\n    await this.writeWindowsUserPathEntry(nextEntries.join(';'), pathDirectory, 'remove')\n  }\n\n  private async readWindowsUserPathForMutation(): Promise<{\n    value: string | null\n    expandable: boolean\n  }> {\n    const result = await this.userPathMutationReader()\n    if (result.state === 'success') {\n      return { value: result.value, expandable: result.expandable }\n    }\n    // Why: PATH is read-modify-write; continuing after a failed read could clobber the user's PATH with a partial value.\n    throw new Error(`${result.detail} No PATH changes were made.`)\n  }\n\n  // Why: raw PowerShell errors reach the UI, so translate denied PATH writes (keeping the original as cause).\n  private async writeWindowsUserPathEntry(\n    value: string,\n    pathDirectory: string,\n    action: 'add' | 'remove'\n  ): Promise<void> {\n    try {\n      await this.userPathWriter(value)\n      this.userPathCacheInvalidator()\n    } catch (error) {\n      if (!isWindowsUserPathPermissionError(error)) {\n        throw error\n      }\n      const guidance =\n        action === 'add'\n          ? `Add this folder to your PATH manually: ${pathDirectory}. Or run Orca as an administrator and try again.`","sourceCodeStart":857,"sourceCodeEnd":893,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/src/main/cli/cli-installer.ts#L857-L893","documentation":"Thrown by readWindowsUserPathForMutation when the userPathMutationReader fails to read the Windows user PATH registry value. The error message includes result.detail from the reader. This is a fail-safe: PATH is read-modify-write, so continuing after a failed read could clobber the user's PATH with a partial value.","triggerScenarios":"The PowerShell or registry read of HKCU\\Environment PATH returns an error state (not 'success'). This happens when the registry key is inaccessible, PowerShell fails to execute, or the PATH value is unreadable.","commonSituations":"Group Policy restricts registry access to HKCU\\Environment. PowerShell execution policy blocks the read script. Antivirus interferes with PowerShell child process spawning. Corrupted PATH registry value.","solutions":["Check result.detail in the error message for the specific read failure.","Manually verify the PATH key: open 'reg query HKCU\\Environment /v Path' in a terminal.","If PowerShell is blocked, check execution policy: 'Get-ExecutionPolicy -List'.","Temporarily disable antivirus interference or add an exclusion for Orca's PowerShell usage."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await installer.ensureWindowsPathEntry(dir)\n} catch (error) {\n  if (error instanceof Error && error.message.includes('No PATH changes were made')) {\n    // PATH read failed; do not attempt writes; show manual instructions\n    showManualPathGuidance(dir)\n  } else { throw error }\n}","preventionTips":["Verify HKCU\\\\Environment is readable before PATH operations.","Check PowerShell execution policy isn't blocking Orca's scripts.","Log result.detail to diagnose the specific read failure."],"tags":["cli-installer","windows","path","registry","powershell"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}