run-ts.sh: only delete tmp file if successful

This commit is contained in:
Peter Fajdiga
2024-04-26 18:26:09 +02:00
parent ee14509228
commit 28e54434aa

View File

@@ -1,3 +1,2 @@
#!/bin/bash
tsc -p "$1" --outFile ./run-ts-tmp.js && node ./run-ts-tmp.js
rm ./run-ts-tmp.js
tsc -p "$1" --outFile ./run-ts-tmp.js && node ./run-ts-tmp.js && rm ./run-ts-tmp.js