title: Scala: Unable to set environment variable
body: <p>Friends,</p>
  
  <p>I'm trying to set the environment variable "asdf" in my Scala shell, as described <a href="https://stackoverflow.com/questions/9443190/modifying-environment-variable-for-a-process-with-scala-sys-process">here</a></p>
  
  <p>These are my commands:</p>
  
  <pre><code>scala&gt; import scala.sys.process.Process
  import scala.sys.process.Process
  
  scala&gt; Process(Seq("bash", "-c", "echo $asdf"), None, "asdf" -&gt; "Hello, world!").!
  Hello, world!
  res18: Int = 0
  </code></pre>
  
  <p>But when i try to read the environment variable back:</p>
  
  <pre><code>scala&gt; sys.env.get("asdf")
  res19: Option[String] = None
  </code></pre>
  
  <p>The output says "None". How do i properly set my environment variable <strong>in the current session</strong>? </p>
  
  <p>PS - Please do not downvote this; i'm trying really hard but unable to get past my issue</p>