You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: cross-platform correctness in home/git/bin/process-lock
- env/home.ts: fall back to $USERPROFILE when $HOME is unset. HOME is
typically unset on Windows; previously getHome() returned undefined
there, breaking downstream pnpm/yarn path resolution.
- git.ts: split git output on /\r?\n/ so Windows (CRLF) is handled.
Wrap realpathSync in try/catch that falls back to the input path for
EACCES/EPERM/EIO (container/overlay FS) while still re-throwing
ENOENT/ENOTDIR so missing-path errors remain visible.
- bin.ts: findRealNpm/Pnpm/Yarn now branch on WIN32 and guard every
env-derived path against undefined. Previously path.join(getHome()
as string, ...) would throw TypeError when HOME was unset.
- process-lock.ts: replace Math.max(lastIndexOf('/'), '\\') with
path.dirname() so parent-dir resolution works for mixed or absent
separators. Hoist the fs destructure out of module scope (was
subverting the lazy-require pattern). Use Date.now()/1000 for
utimesSync to avoid allocating a Date on every touch tick.
Covered by a new home.test.mts regression for the USERPROFILE
fallback; existing git/process-lock/bin suites already exercise the
changed code paths.
0 commit comments