I alias the path of my cross compiler in my linux system. Now I want use that alias in my task.json
of VS Code.
So I write this snippet:
{
"version": "2.0.0",
"tasks": [
{
"label": "Test",
"type": "shell",
"linux": {
"command": "My_gcc"
},
}
]
}
But I got this
Error 127: Command "My_gcc" not found
Why do I get this error?
Just alter your task as follows:
"command": "source ~/.bash_profile && My_gcc"
This will make it source ~/.bash_profile into scope before trying to use your alias.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With