-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Env vars are lost in bazel run configurations #6163
Comments
Based on @tpasternak analysis this is expected to be due to #5885. @blorente can you please take a look? |
Ok, I'm pretty sure I know what happened
|
So it seems like for some users the plugin is unusable now - all the tests fail |
I'll take a look first time tomorrow. |
…MacOS Use CONSOLE ParentEnvironmentType instead of SYSTEM CONSOLE is the default value initialized in GeneralCommandLineso it was used before. Now, if we want to inherit the system envs we use SYSTEM, so in both cases it differs from what was there before. This PR just brings the old behavior in case a user wants to inherit enviroment from the system. https://github.com/JetBrains/intellij-community/blob/9838665ba816fc8ce06e4071aa5a906a35fbb22e/platform/platform-util-io/src/com/intellij/execution/configurations/GeneralCommandLine.java#L85C1-L86C1 fixes bazelbuild#6163
@blorente thanks, I think I've found the root cause but I'm not sure if this matches the overall idea |
…MacOS (#6164) Use CONSOLE ParentEnvironmentType instead of SYSTEM CONSOLE is the default value initialized in GeneralCommandLineso it was used before. Now, if we want to inherit the system envs we use SYSTEM, so in both cases it differs from what was there before. This PR just brings the old behavior in case a user wants to inherit enviroment from the system. https://github.com/JetBrains/intellij-community/blob/9838665ba816fc8ce06e4071aa5a906a35fbb22e/platform/platform-util-io/src/com/intellij/execution/configurations/GeneralCommandLine.java#L85C1-L86C1 fixes #6163
…MacOS (#6164) Use CONSOLE ParentEnvironmentType instead of SYSTEM CONSOLE is the default value initialized in GeneralCommandLineso it was used before. Now, if we want to inherit the system envs we use SYSTEM, so in both cases it differs from what was there before. This PR just brings the old behavior in case a user wants to inherit enviroment from the system. https://github.com/JetBrains/intellij-community/blob/9838665ba816fc8ce06e4071aa5a906a35fbb22e/platform/platform-util-io/src/com/intellij/execution/configurations/GeneralCommandLine.java#L85C1-L86C1 fixes #6163
…MacOS (#6164) Use CONSOLE ParentEnvironmentType instead of SYSTEM CONSOLE is the default value initialized in GeneralCommandLineso it was used before. Now, if we want to inherit the system envs we use SYSTEM, so in both cases it differs from what was there before. This PR just brings the old behavior in case a user wants to inherit enviroment from the system. https://github.com/JetBrains/intellij-community/blob/9838665ba816fc8ce06e4071aa5a906a35fbb22e/platform/platform-util-io/src/com/intellij/execution/configurations/GeneralCommandLine.java#L85C1-L86C1 fixes #6163
Hello! I'm trying to repro this issue to add some automated tests, but I'm not seeing any difference between CONSOLE and SYSTEM.
sh_binary(
name = "test_env_vars_bin",
srcs = ["test_env_vars.sh"],
)
#!/usr/bin/env bash
set -euo pipefail
echo "USER: $USER"
echo "PATH: $PATH"
echo "HOME: $HOME"
echo "GOROOT: $GOROOT" And both SYSTEM and CONSOLE print the same thing as running the script with a "Run Shell" run configuration. |
Description of the bug:
Which category does this issue belong to?
No response
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
No response
Which Intellij IDE are you using? Please provide the specific version.
No response
What programming languages and tools are you using? Please provide specific versions.
No response
What Bazel plugin version are you using?
No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: