Skip to content

Commit 5bc0a9d

Browse files
authored
Merge pull request #3377 from odaysec/patch-2
fix(codeSign) shell command built from environment values
2 parents e6cec4d + 7fa03e0 commit 5bc0a9d

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

app/mac/scripts/codeSign.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
require('dotenv').config();
2-
const { execSync } = require('child_process');
2+
const { execFileSync } = require('child_process');
33
const path = require('path');
44

55
exports.default = async function codeSign(config) {
@@ -14,8 +14,9 @@ exports.default = async function codeSign(config) {
1414

1515
let exitCode = 0;
1616
try {
17-
execSync(
18-
`codesign -s ${teamID} --deep --force --options runtime --entitlements ${entitlementsPath} ${config.app}`
17+
execFileSync(
18+
'codesign',
19+
['-s', teamID, '--deep', '--force', '--options', 'runtime', '--entitlements', entitlementsPath, config.app]
1920
);
2021
} catch (e) {
2122
exitCode = e.status !== null ? e.status : 1;

0 commit comments

Comments
 (0)