feat(signing): improve error logging in case of error

This commit is contained in:
Elian Doran 2025-05-14 13:03:09 +03:00
parent 1abcf7244f
commit 4adaf97127
No known key found for this signature in database

View File

@ -17,8 +17,14 @@ module.exports = function (filePath) {
}
const command = `${WINDOWS_SIGN_EXECUTABLE} --executable "${filePath}"`;
console.log(`[Sign] ${command}`);
console.log(`[Sign] Running ${command}`);
const output = child_process.execSync(command);
console.log(`[Sign] ${output}`);
try {
child_process.execSync(command);
} catch (e) {
console.warn(`[Sign] Unable to sign ${filePath} due to:\n${e.stdout.toString("utf-8")})}`)
return;
}
console.log(`[Sign] Signed ${filePath} successfully.`);
}