{"record":{"id":"0ff44c91503739f3","repo":"musistudio/claude-code-router","slug":"result-stderr-result-stdout-powershell-e","errorCode":null,"errorMessage":"${(result.stderr || result.stdout || `powershell.exe exited with ${result.status}`).trim()}","messagePattern":"(.+?)`\\)\\.trim\\(\\)\\}","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/src/profiles/launch-service.ts","lineNumber":1963,"sourceCode":"    \"  Write-Output 'UNCHANGED'\",\n    \"}\"\n  ].join(\"\\n\");\n  const result = spawnSync(windowsSystemCommand(\"powershell.exe\"), [\n    \"-NoProfile\",\n    \"-NonInteractive\",\n    \"-ExecutionPolicy\",\n    \"Bypass\",\n    \"-Command\",\n    script\n  ], {\n    encoding: \"utf8\",\n    windowsHide: true\n  });\n  if (result.error) {\n    throw result.error;\n  }\n  if (result.status !== 0) {\n    throw new Error((result.stderr || result.stdout || `powershell.exe exited with ${result.status}`).trim());\n  }\n  return result.stdout.trim().split(/\\r?\\n/).includes(\"CHANGED\");\n}\n\nfunction ensurePosixShellPath(binDir: string): void {\n  const shellName = path.basename(process.env.SHELL || \"\").toLowerCase();\n  if (shellName.includes(\"fish\")) {\n    ensureFishPathBlock(path.join(os.homedir(), \".config\", \"fish\", \"conf.d\", \"ccr.fish\"), binDir);\n    return;\n  }\n  ensureShellRcPathBlock(preferredShellRcFile(shellName), binDir);\n}\n\nfunction preferredShellRcFile(shellName = path.basename(process.env.SHELL || \"\").toLowerCase()): string {\n  const home = os.homedir();\n  if (shellName.includes(\"zsh\")) {\n    return path.join(home, \".zshrc\");\n  }","sourceCodeStart":1945,"sourceCodeEnd":1981,"githubUrl":"https://github.com/musistudio/claude-code-router/blob/99f24806c6a2c660b16e53e95211c517448a6c90/packages/core/src/profiles/launch-service.ts#L1945-L1981","documentation":"Error \"${(result.stderr || result.stdout || `powershell.exe exited with ${result.status}`).trim()}\" thrown in musistudio/claude-code-router.","triggerScenarios":"Thrown at packages/core/src/profiles/launch-service.ts:1963 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":"99f24806c6a2c660b16e53e95211c517448a6c90","analyzedAt":"2026-08-27T04:11:01.184Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}