title: Using a shell command as VSCode task variable value
body: <p>I am trying to define a VSCode task in <code>tasks.json</code> that would adapt to the specific architecture where VSCode runs. To do this, I want to get the architecture as <code>uname --m</code> (<em>e.g.</em> "aarch64" or "amd64"). My goal is to interpolate the output of <code>uname</code> into an environment variable like so</p>
  
  <pre><code>"version": "2.0.0",
  "tasks": [
      {
          "label": "build",
          "type": "shell",
          "command": "cmake",
          "args": [
              "-DMYLIB_INCLUDE_DIR=$MYLIB/include",
              "-DMYLIB_LIBRARY=$MYLIB/lib"
          ],
          "options": {
              "env": {
                  "MYLIB": "${workspaceFolder}/mylib/${command:get_arch}"
              }
          },
      }
  ]
  </code></pre>
  
  <p>In my case, I will have architecture-specific versions of <code>mylib</code> under <code>mylib/aarch64</code>, <code>mylib/amd64</code>, <em>etc</em>.</p>
  
  <p>My attempt so far as been to define a second <code>get_arch</code> task used in the environment definition of <code>MYLIB</code>, that simply runs <code>uname</code>. </p>
  
  <pre><code>{
      "label": "get_arch",
      "type": "shell",
      "command": "uname --m"
  }
  </code></pre>
  
  <p>Of course, this task is not a proper command and so it isn't detected by VSCode and my build task fails. I checked out the documentation on variable substition, but they don't mention if it's possible to substitute a <em>shell command</em>. I guess this would be possible from within an extension, but I want to keep things as simple as possible.  </p>