Fix build?

This commit is contained in:
Sergio Padrino
2022-11-18 00:37:33 +01:00
parent 7c547c7fe9
commit 8650af289c
2 changed files with 28 additions and 11 deletions

View File

@@ -167,16 +167,33 @@ function setAtomHelperVersion(packagedAppPath) {
'Info.plist'
);
console.log(`Setting Atom Helper Version for ${helperPListPath}`);
spawnSync('/usr/libexec/PlistBuddy', [
'-c',
`Add CFBundleVersion string ${CONFIG.appMetadata.version}`,
helperPListPath
]);
spawnSync('/usr/libexec/PlistBuddy', [
'-c',
`Add CFBundleShortVersionString string ${CONFIG.appMetadata.version}`,
helperPListPath
]);
try {
spawnSync('/usr/libexec/PlistBuddy', [
'-c',
`Add CFBundleVersion string ${CONFIG.appMetadata.version}`,
helperPListPath
]);
} catch (error) {
spawnSync('/usr/libexec/PlistBuddy', [
'-c',
`Set CFBundleVersion string ${CONFIG.appMetadata.version}`,
helperPListPath
]);
}
try {
spawnSync('/usr/libexec/PlistBuddy', [
'-c',
`Add CFBundleShortVersionString string ${CONFIG.appMetadata.version}`,
helperPListPath
]);
} catch (error) {
spawnSync('/usr/libexec/PlistBuddy', [
'-c',
`Set CFBundleShortVersionString string ${CONFIG.appMetadata.version}`,
helperPListPath
]);
}
}
function chmodNodeFiles(packagedAppPath) {

View File

@@ -14,7 +14,7 @@ module.exports = function() {
if (result.stdout) console.error(result.stdout.toString());
if (result.stderr) console.error(result.stderr.toString());
throw new Error(
`Command ${result.args.join(' ')} exited with code "${result.status}"`
`Command ${(result.args ?? []).join(' ')} exited with code "${result.status}"`
);
} else {
return result;