Sublime Forum

How to cancel previously started builds

#1

I have a build that runs this command npx tsc --noEmit --skipLibCheck --watch. (note the --watch flag, it will run the process forever until canceled)

I am aware that there is a Build: Cancel option in the command palette.
But the reality is that i can start a build multiple times. And end up with a lot of this processes:

If I run Build: Cancel only the last will be killed.
Is there a way to cancel other previous builds?

0 Likes

Clear build output before displaying in new result
#2

I tried not to pkill all proceses with pkill -f tsc before running the command npx tsc --noEmit --skipLibCheck --watch, but without success.

{
    "shell": true,
    "cmd": "pkill -f tsc && npx tsc --noEmit --skipLibCheck --watch",
    "file_regex": "(.*\\.ts?)\\(([0-9]+)\\,([0-9]+)\\)\\:\\s(...*?)$",
    "selector": "source.js.typescript",
}

I get this in the build panel

[Finished in 0.0s with exit code -15]
[cmd: pkill -f tsc && npx tsc --noEmit --skipLibCheck --watch]
[dir: /home/predrag/Downloads/helo/tss]
[path: /home/predrag/.cargo/bin:/home/predrag/.npm-global/bin:/home/predrag/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin]
0 Likes

#3

solution found in Clear build output before displaying in new result

0 Likes