Skip to content

Commit

Permalink
tweak powershell cmd windows signing
Browse files Browse the repository at this point in the history
  • Loading branch information
antonbuks committed Jun 28, 2024
1 parent 13e9538 commit a5e275a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/winsign.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ exports.default = async (config) => {
const signCommand = '.\\scripts\\sign.ps1';
const keyPairAlias = `"${process.env.SM_KEYPAIR_ALIAS}"`;
const sign = [
'pwsh',
'powershell',
'-NoProfile',
'-ExecutionPolicy Unrestricted',
`-Command \"$Input | ${signCommand}`,
Expand All @@ -28,7 +28,7 @@ exports.default = async (config) => {
`-SmctlDir '${smctlDir}'`,
`-SignToolDir '${signToolDir}'\"`,
];
const signStdout = execSync(sign.join(' ')).toString();
const signStdout = execSync(sign.join(' '), {shell: 'powershell.exe'}).toString();
if (signStdout.match(/FAILED/)) {
console.error(
`Error detected in ${signCommand}: [${signStdout}]`,
Expand All @@ -44,7 +44,7 @@ exports.default = async (config) => {
const verifyCommand = '.\\scripts\\verify.ps1';
const fingerprint = `"${process.env.SM_CODE_SIGNING_CERT_SHA1_HASH}"`;
const verify = [
'pwsh',
'powershell',
'-NoProfile',
'-ExecutionPolicy Unrestricted',
`-Command \"$Input | ${verifyCommand}`,
Expand Down

0 comments on commit a5e275a

Please sign in to comment.