Skip to content

An installer's exec task looks up its command in the IDE's PATH, not in the environment of its working directory #1887

Closed

Description

@lagergren

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

  1. added a commit that references this issue on Nov 10, 2026
    18f9d5e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions