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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug] Installing EnvFile plug breaks run configuration variables

medington opened this issue · 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

This should be fixed now.