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
{{ message }}
Repository navigation
An installer's exec task looks up its command in the IDE's PATH, not in the environment of its working directory #1887
An installer's exec task (ExecTask) runs its command with the IDE's environment and a working directory. Since IntelliJ 2025.1, the platform customizes the environment of the process for that working directory (the commandLineEnvCustomizer extension point, as the mise plugin uses), but it looks up the command before that, in the PATH given to the command line, which is the IDE's. So an installer can run, for instance, the IDE's npm with the directory's node, and install a language server with other tools than the ones it then runs with.
How it happens
ExecTask builds new GeneralCommandLine(resolvedCommand).withEnvironment(EnvironmentUtil.getEnvironmentMap()) and sets the working directory. GeneralCommandLine.validateAndPrepareCommandLineForLocalRun() looks up the executable in that environment's PATH, and setupEnvironment() applies the directory's customizations only when the process starts.
Possible direction
Look up the command as #1693 does for language servers and debug adapters, in the PATH of getEffectiveEnvironment(), which includes the directory's customizations, so that an installer and the server it installs use the same tools (#1660).
Activity
fix: look up a plugin's server command and an installer's exec comman…