ashald / EnvFile

EnvFile 3.x is a plugin for JetBrains IDEs that allows you to set environment variables for your run configurations from one or multiple files.
MIT License
535 stars 126 forks source link

[Bug] Installing EnvFile plug breaks run configuration variables #178

Closed medington closed 1 year ago

medington commented 2 years ago

Simply installing the plugin causes normal run configuration environment variables to be ignored.

Steps:

echo $DEBUG


 - Click the green arrow next to shebang to create run config and run the script
 - Note the script exits with (as expected):

> scratch: line 4: DEBUG: unbound variable

- Open run configuration and set `DEBUG=1` as the environment variables
- Re-run and confirm the error goes away and `1` echos
- Install EnvFile plugin and restart the IDE
- Re-run the script
- Once again, script fails with the `unbound variable` error message indicating variable isn't set

Additional Notes:
---
 - Does not seem to matter if the checkbox to "Enable EnvFile" is checked or not
 - Very strange to me that the default `<Run configuration Env Vars>` is grayed out, why is that?
 - Testing against IntelliJ 2021.3 on a Mac / EnvFile version 3.2.2

Workarounds:
---
 - Uninstall EnvFile or add all environment variables **ONLY** to a .env file
ashald commented 1 year ago

This should be fixed now.