@tyhld/conductor 0.12.73 → 0.12.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/headless.js +9 -0
- package/package.json +1 -1
package/dist/headless.js
CHANGED
|
@@ -606,6 +606,15 @@ export function spawnClaudeProcess(cfg, cmd, sessionId, attempt, isResume) {
|
|
|
606
606
|
env.CONDUCTOR_SITE = cfg.site;
|
|
607
607
|
env.CONDUCTOR_MACHINE = cfg.machine;
|
|
608
608
|
env.CONDUCTOR_WORK_DIR = cfg.workDir;
|
|
609
|
+
// ★claude が見つかった bin ディレクトリを PATH の先頭に足す(便 24c9b6b6)。
|
|
610
|
+
// systemd 経由の起動では nvm の bin が PATH に無いため、子プロセスの bash から
|
|
611
|
+
// claude・node・npm・pnpm が command not found になる。resolveClaudeBin() が
|
|
612
|
+
// 信頼したディレクトリだけを足す。重複させない・PATH が空でも動く。
|
|
613
|
+
const claudeBinDir = path.dirname(claudeBin);
|
|
614
|
+
const currentPath = env.PATH ?? '';
|
|
615
|
+
if (!currentPath.split(':').includes(claudeBinDir)) {
|
|
616
|
+
env.PATH = currentPath ? `${claudeBinDir}:${currentPath}` : claudeBinDir;
|
|
617
|
+
}
|
|
609
618
|
// ★テスト用: CONDUCTOR_CLAUDE_CONFIG_DIR を設定すると、claude の設定フォルダを差し替える。
|
|
610
619
|
// 本物のログインを壊さずに認証エラーを再現できる(空のフォルダを指す → not logged in)。
|
|
611
620
|
// 本番では設定しない(claude は既定の ~/.claude を使う)。
|