GOLAND Environment Vars in .env file

爱⌒轻易说出口 提交于 2020-01-05 04:27:08

问题


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.


回答1:


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

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




回答2:


You can go to Tools | Create command line launcher... and then start GoLand from the command line, which will then inherit those environment variables and pass it to your run configurations.

At the moment this feature is not supported, you can request it on the issue tracker.



来源:https://stackoverflow.com/questions/48863021/goland-environment-vars-in-env-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!