0

I have several workspaces that have unique environments.

When I load a workspace, I would like to update the linux $PATH accordingly, however, I tried the following:

### workspace.code-workspace
{
    "folders": [
        {
            "path": "."
        }
    ],
    "settings": {},
    "tasks": [
        {
          "command": "export $PATH=${workspaceFolder}/bin:$PATH"
        }
      ]
}

Which fails according to:

me@pc:~/Containers/cuda_devcon/project$ ls -alvh ./bin/julia 
lrwxrwxrwx 1 me me 21 Jan 29 17:38 ./bin/julia -> julia-1.6.7/bin/julia
me@pc:~/Containers/cuda_devcon/project$ which julia
me@pc:~/Containers/cuda_devcon/project$ julia

Command 'julia' not found, but can be installed with:

sudo snap install julia  # version 1.8.5, or
sudo apt  install julia  # version 1.4.1+dfsg-1

See 'snap info julia' for additional versions. 
mkk
  • 879
  • 6
  • 19
  • julia is installed at `julia-1.6.7/bin/julia` which already executes in the environment – mkk Jan 29 '23 at 17:56
  • that's the point of the question, how to export a concatenated path successfully when the workspace is loaded – mkk Jan 29 '23 at 17:59
  • julia is just an example of an executable. im happy to change the name if its distracting to you – mkk Jan 29 '23 at 17:59
  • Ah, I see. The structure of the question misled me: I assumed the error listing was the *result* of your executing the task, not the situation that made you want to execute it. – Ann L. Jan 29 '23 at 17:59
  • Do you have any reason to think that the task is even executing? – Ann L. Jan 29 '23 at 18:00
  • Conceivably, this Q and A might help: https://stackoverflow.com/questions/43983718/set-global-path-environment-variable-in-vs-code?rq=1 – Ann L. Jan 29 '23 at 18:01

0 Answers0