Closed vik748 closed 7 months ago
It should be doing that already - I'll see if I can reproduce. What docker image ar you using?
I am using it without docker.
That's probably the issue, the workspace was made to run with a docker. I'll look into updating the plugin to source before running itself.
In the meantime you can try either of the following:
source /opt/ros/humble/setup.bash
code .
tasks.json
{
"label": "source",
"detail": "Source workspace",
"type": "shell",
"command": "source /opt/ros/humble/setup.bash",
"problemMatcher": []
},
{
"label": "cpplint",
"detail": "Lint files with cpplint.",
"type": "ament",
"task": "cpplint",
"path": "src/",
"problemMatcher": "$ament_cpplint",
"presentation": {
"reveal": "silent",
"clear": true
},
"dependsOn": ["source"],
"dependsOrder": "sequence"
},
Ok, I updated the ament task provider extension so you can specify a pre-run command. Update that plugin and pull the latest.
@athackst thanks for the PRs. This helps make everything work smoothly.
Hi, thanks for this great set of tools and settings, it is tremendously useful. I am trying to use this on my local machine and running into a couple issues. All the tasks that are type 'shell' seem to be working fine. However, I run into an issue with the 'ament' type tasks.
eg. when I run the flake8 task, it says ament_flake8 command not found. Is there a way to add a 'source /opt/ros/humble/setup.bash' before the tasks run?