mirror of
https://github.com/stablyai/orca.git
synced 2026-10-31 09:07:40 +00:00
fix(windows): probe fnm's real default alias dir for Node fallback (#11359)
* fix(windows): probe fnm's real default alias dir for Node fallback On Windows, fnm stores the default alias under FNM_DIR, else %APPDATA%\fnm (legacy ~\.fnm), and node.exe sits directly in aliases\default with no bin subdir. Probe those dirs and append them to PATH so fnm's default only backfills a missing Node instead of shadowing an inherited one. Fixes #11356 Co-authored-by: niceSprite <16523864+iFwu@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com> * test: keep onTestFinished callbacks returning void --------- Co-authored-by: Neil <neil@stably.ai> Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
co-authored by
niceSprite
Claude
Neil
parent
62d9eb635b
commit
27a8963806
@@ -2,6 +2,7 @@ import { accessSync, constants, existsSync, readFileSync, readdirSync, statSync
|
||||
import { homedir } from 'node:os'
|
||||
import { delimiter, dirname, isAbsolute, join } from 'node:path'
|
||||
import { firstWindowsPathEnvKey, isNativeExecutable } from './cli-runtime-pairing-inputs'
|
||||
import { getFnmDefaultAliasDirectories } from './fnm-default-alias-dirs'
|
||||
import { getSystemCliInstallDirectories } from './system-cli-install-dirs'
|
||||
|
||||
type ResolveCommandOptions = {
|
||||
@@ -93,7 +94,7 @@ function getBaseVersionManagerDirectories(platform: NodeJS.Platform, homePath: s
|
||||
const directories = [
|
||||
join(homePath, '.volta', 'bin'),
|
||||
join(homePath, '.asdf', 'shims'),
|
||||
join(homePath, '.fnm', 'aliases', 'default', 'bin'),
|
||||
...getFnmDefaultAliasDirectories(platform, homePath),
|
||||
join(homePath, '.local', 'share', 'mise', 'shims')
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user