Skip to content

fix: resolve npx from shell environment PATH instead of raw IDE process PATH - #119

Merged
davydkov merged 1 commit into
likec4:mainfrom
wikando-ck:fix/resolve-npx-from-shell-path
Nov 11, 2026
Merged

davydkov merged 1 commit into
likec4:mainfrom
wikando-ck:fix/resolve-npx-from-shell-path

Conversation

@wikando-ck

Copy link
Copy Markdown
Contributor

Closes #118

Problem

isAvailable() searched npx in System.getenv("PATH"). On macOS, IDEs launched from Dock/Finder only get the launchd PATH (/usr/bin:/bin:/usr/sbin:/sbin), so Homebrew/nvm installs are never found and users get "Node.js not found".

Fix

Use PathEnvironmentVariableUtil.findExecutableInPathOnAnyOS("npx"):

  • resolves against the shell-loaded PATH (EnvironmentUtil), the same environment used to launch the server via ParentEnvironmentType.CONSOLE
  • handles Windows executable extensions (PATHEXT), so the manual .cmd/.bat/.exe loop is no longer needed

Verification

  • ./gradlew buildPlugin succeeds

@coderabbitai

coderabbitai Bot commented Nov 6, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a5427cfe-129d-45ae-bed6-dd86eaf7bdf8
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@davydkov
davydkov enabled auto-merge (rebase) November 11, 2026 16:13
@davydkov
davydkov merged commit a6d288d into likec4:main Nov 11, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Node.js not found" on macOS when IDE is launched from Dock/Finder

2 participants