EnvFile icon indicating copy to clipboard operation
EnvFile copied to clipboard

[Bug] Installing EnvFile plug breaks run configuration variables

Open medington opened this issue 3 years ago • 0 comments

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

Steps:

  • Uninstall EnvFile if installed / restart IDE
  • Create a new empty project
  • Create a new bash script file with:
#!/bin/bash
set -eu

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

medington avatar Apr 25 '22 14:04 medington