intellij-ideagoland

GOLAND Environment Vars in .env file


Could anyone say me how to export environment vars before running GoLand Run" with such command:

source .env

.env file:

export MY_VAR="Some value"

Yes I know, that I can define all vars in run config using "Environment variables", but it is too, em... bad solution, as I store all vars in bash file.


Solution

  • There is a plugin built for this purpose. It can import.env ,.json and .yaml.

    https://plugins.jetbrains.com/plugin/7861-envfile