script: Add basic error handling in CI binary renaming script

Throw literally the entire script into a try/catch.

This script should exit "cleanly" no matter what,
and avoid erroring out the overall CI run at all costs.

(This script is run on a best-effort basis, and should first do no
harm, since the automation it provides is easy to replicate manually.)
This commit is contained in:
DeeDeeG 2023-08-16 19:19:07 -04:00
parent e23c70ac98
commit d11f5238c9

View File

@ -1,3 +1,5 @@
try {
console.log("Starting the binary renaming script...");
const fs = require('fs');
@ -51,3 +53,8 @@ if (lastSegment.length > 4) {
});
};
};
} catch (e) {
console.error("There was a problem during the renaming script!:");
console.error(e);
};