Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't pass environment variables to an sbt task in intellij

When running a play application from IntelliJ, VM parameters and environment variables greyed out in run configuration when 'Use sbt shell' checked. How can I pass an env variable to the sbt task, other then unchecking the 'run as sbt task' checkbox or setting the env variable globally on the machine?

like image 727
iDPWF1 Avatar asked Nov 07 '22 17:11

iDPWF1


1 Answers

Been there. Use .env file and add plugin: https://github.com/mefellows/sbt-dotenv to your project. Working for me great.

like image 83
landsman Avatar answered Nov 13 '22 02:11

landsman