title: Set environment variables in task.json in vscode for WSL
body: <p>I tried to set environment variables for my Visual Studio Code tasks that will run in my Windows Subsystem Linux. However, it does not seem to work. Here is my tasks.json:</p>
  
  <pre><code>{
      // See https://go.microsoft.com/fwlink/?LinkId=733558
      // for the documentation about the tasks.json format
      "version": "2.0.0",
      "tasks": [
          {
              "label": "test env",
              "type": "shell",
              "command": "echo",
              "args": [
                  "$test"
              ],
              "options": {
                  "env": {
                      "test": "test_string"
                  }
              }
  
          },
      ]
  }
  </code></pre>
  
  <p>The output is:</p>
  
  <pre><code>&gt; Executing task in folder ex12-test: echo $test &lt;
  
  
  
  Terminal will be reused by tasks, press any key to close it.
  </code></pre>
  
  <p>Note that by default shell has been manually modified to <code>C:\WINDOWS\SysNative\bash.exe</code>for WSL, as recommended <a href="https://stackoverflow.com/questions/44450218/how-do-i-use-bash-on-ubuntu-on-windows-wsl-for-my-vs-code-terminal">here</a> and <a href="https://github.com/Microsoft/vscode-cpptools/blob/master/Documentation/Debugger/gdb/Windows%20Subsystem%20for%20Linux.md" rel="noreferrer">here</a>.</p>