I have the following VSCode task:
{
"label": "gen-and-dep",
"type": "shell",
"options": {
"cwd": "${workspaceFolder}/child_folder"
},
"command": "source ~/folder/env.sh && sdk generate",
"group": "build"
},
But the terminal is always saying that the sdk: command not found
.
The idea is that this sdk
is actually an alias defined in the sourced file from the first command(the ~/folder/env.sh
), which is as following: alias sdk="python3 ${FOLDER_ENV}/sdk.py"
. Using a normal terminal, everything is fine if I first source the script, and then call the sdk
command, but the task reacts as if the source
command is not active.
I found other similar posts, but it seems that I’m already doing the right thing.
What could be the actual issue?