fix(ci): probe common Node.js paths on Windows when PATH lookup fails#401
Open
alezander86 wants to merge 1 commit into
Open
fix(ci): probe common Node.js paths on Windows when PATH lookup fails#401alezander86 wants to merge 1 commit into
alezander86 wants to merge 1 commit into
Conversation
…up fails GUI apps like Connect wizard may not inherit the user's shell PATH, causing Node.js detection to fail even when Node is installed at C:\Program Files\nodejs\. Add fallback probes for the most common install locations before throwing 'Node.js not found'. Probed paths: - %ProgramFiles%\nodejs\node.exe - %ProgramFiles(x86)%\nodejs\node.exe - %LOCALAPPDATA%\Programs\nodejs\node.exe Fixes: INC0000773156 Generated with AI Co-Authored-By: codemie-ai <codemie.ai@gmail.com>
a0244d1 to
303df3f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
install/windows/install.ps1: Add fallback path probing for Node.js whenGet-CommandPathreturns empty. GUI apps like the Connect wizard may not inherit the user's shell PATH, sonode.exeatC:\Program Files\nodejs\is invisible to the installer even though it's installed.Problem
Users who install Node.js via the company portal (installs to
C:\Program Files\nodejs\) see "Check Node.js & npm failed — Node.js not found" in the Connect wizard. Root cause: the Electron app spawns processes that don't inherit user-level PATH entries.Fix
After the initial
Get-CommandPath 'node.exe'fails, the script now probes:%ProgramFiles%\nodejs\node.exe%ProgramFiles(x86)%\nodejs\node.exe%LOCALAPPDATA%\Programs\nodejs\node.exeThis mirrors the pattern already used by
isGitInstalledin the native Swift wizard.Test plan
install.ps1on a Windows machine where Node.js is installed via company portal and not in PATHcodemie doctorpasses after installRef: INC0000773156