Skip to content

Create a way to provide environment variables #1097

@greatvovan

Description

@greatvovan

As Scala lacks methods for setting environment variables, simulation of them for code that consumes environment is complicated.

I got away with build settings like that:

fork in run := true

envVars in run := Map(
  "MY_VAR" -> "MY VALUE"
)

Example:

println(sys.env("MY_VAR"))
Thread.sleep(5000)

The problems with that approach are:

  • the console output of the program is displayed differently than in normal mode (sbt prefix);
  • after program termination the bottom panel switches to the program output (which stays empty forever), effectively hiding the real output.

I suggest to add a tab where the user could set environment variables in an intuitive way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions