Define the args variable

also it's not osslsigncode anymore
This commit is contained in:
David Baker 2020-03-06 14:35:09 +00:00
parent cee7410388
commit 6e8f8dcdce

View file

@ -3,6 +3,8 @@ const path = require('path');
// Loosely based on computeSignToolArgs from app-builder-lib/src/codeSign/windowsCodeSign.ts
function computeSignToolArgs(options, keyContainer, inputFile) {
const args = [];
if (process.env.ELECTRON_BUILDER_OFFLINE !== "true") {
const timestampingServiceUrl = options.timeStampServer || "http://timestamp.digicert.com";
args.push(options.isNest || options.hash === "sha256" ? "/tr" : "/t", options.isNest || options.hash === "sha256" ? (options.options.rfc3161TimeStampServer || "http://timestamp.comodoca.com/rfc3161") : timestampingServiceUrl);
@ -52,8 +54,8 @@ exports.default = async function(cfg) {
console.log("Running signtool with args", args);
execFile('signtool', args, {}, (error, stdout) => {
if (error) {
console.error("osslsigncode failed with code " + error);
reject("osslsigncode failed with code " + code);
console.error("signtool failed with code " + error);
reject("signtool failed with code " + code);
console.log(stdout);
} else {
resolve();