mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-03-17 22:13:08 +00:00
Merge remote-tracking branch 'origin/v0.15.0rc' into feature/bug-startup-warning-ignores-claude-oauth-credenti-fuzx
This commit is contained in:
@@ -25,6 +25,16 @@ import fs from 'fs/promises';
|
||||
// System Tool Path Definitions
|
||||
// =============================================================================
|
||||
|
||||
/**
|
||||
* Get NVM for Windows (nvm4w) symlink paths for a given CLI tool.
|
||||
* Reused across getClaudeCliPaths, getCodexCliPaths, and getOpenCodeCliPaths.
|
||||
*/
|
||||
function getNvmWindowsCliPaths(cliName: string): string[] {
|
||||
const nvmSymlink = process.env.NVM_SYMLINK;
|
||||
if (!nvmSymlink) return [];
|
||||
return [path.join(nvmSymlink, `${cliName}.cmd`), path.join(nvmSymlink, cliName)];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get common paths where GitHub CLI might be installed
|
||||
*/
|
||||
@@ -60,6 +70,7 @@ export function getClaudeCliPaths(): string[] {
|
||||
path.join(appData, 'npm', 'claude'),
|
||||
path.join(appData, '.npm-global', 'bin', 'claude.cmd'),
|
||||
path.join(appData, '.npm-global', 'bin', 'claude'),
|
||||
...getNvmWindowsCliPaths('claude'),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -141,6 +152,7 @@ export function getCodexCliPaths(): string[] {
|
||||
// pnpm on Windows
|
||||
path.join(localAppData, 'pnpm', 'codex.cmd'),
|
||||
path.join(localAppData, 'pnpm', 'codex'),
|
||||
...getNvmWindowsCliPaths('codex'),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1261,6 +1273,7 @@ export function getOpenCodeCliPaths(): string[] {
|
||||
// Go installation (if OpenCode is a Go binary)
|
||||
path.join(homeDir, 'go', 'bin', 'opencode.exe'),
|
||||
path.join(process.env.GOPATH || path.join(homeDir, 'go'), 'bin', 'opencode.exe'),
|
||||
...getNvmWindowsCliPaths('opencode'),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user