Skip to content
loading...

VSCode Tasks - Specifying custom PATH

nirmaljpatel profile image Nirmal Patel github logo ・1 min read  

macOS Catalina opts for zsh as the default shell in place of bash.
This shift had me running into a weird issue with my custom VSCode Tasks where the tasks were throwing a zsh:1: command not found error.

I set default login shell to zsh for my macOS user and set up VSCode to use zsh as the default shell for integrated terminal.

Tried adding export PATH=$PATH:<mypath> to my ~/.zshrc but that didnt help either.

Ultimately I ended up specifying the PATH as a custom env variable in the VSCode task options

"tasks": [
    {
        "label": "Project Name",
        "type": "shell",
        "command": "appc ti project id -o text --no-banner",
        "options": {
            "env": {
                "PATH": "<mypath>:${env:PATH}"
            }
        }
    }
]
twitter logo DISCUSS
Discussion
markdown guide
Classic DEV Post from Jul 26 '19

🎩 JavaScript Enhanced Scss mixins! 🎩 concepts explained

In the next post we are going to explore CSS @apply to supercharge what we talk about here....

Nirmal Patel profile image
Always learning