Situation:
I have three tasks in which the thirdOne should be launched by launch.json as a preLaunchTask.
The pre-requisite for the thirdTask is the secondTask should execute.
Problem:
The third task needs secondTask to execute because, the second one will execute a peice of code which will trigger a node, which ideally shouldn’t be closed or expected to be closed by me. The thirdTask will look for PID of the specific node and if it is not there, will throw a error and exits.
But the secondTask won’t exit becuase the particular code is running and won’t exit till we manually close it or clean it in some way. But I don’t want to change the script2.sh.
tasks.json
{
"version": "2.0.0",
"tasks": [
{
"label": "firstTask",
"command": "cmd1",
"type": "shell"
},
{
"label": "secondTask",
"command": "${workspaceFolder}/script2.sh",
"type": "process",
},
{
"label": "thirdTask",
"command": "${workspaceFolder}/script3.sh",
"type": "shell",
"dependsOn":["secondTask"],
}
]
}