Remove execa dependency from appimage-fix.js

This commit is contained in:
Jelle Glebbeek
2021-03-05 23:49:19 +01:00
parent f02ff4bfad
commit 360c40803e

View File

@@ -11,7 +11,7 @@ function isLinux (targets) {
async function afterPack ({targets, appOutDir}) { async function afterPack ({targets, appOutDir}) {
if ( !isLinux ( targets ) ) return; if ( !isLinux ( targets ) ) return;
const scriptPath = path.join(appOutDir, 'youtube-dl-gui'), const scriptPath = path.join(appOutDir, appName),
script = '#!/bin/bash\n"${BASH_SOURCE%/*}"/' + appName + '.bin "$@" --no-sandbox'; script = '#!/bin/bash\n"${BASH_SOURCE%/*}"/' + appName + '.bin "$@" --no-sandbox';
new Promise((resolve) => { new Promise((resolve) => {
const child = child_process.exec(`mv ${appName} ${appName}.bin`, {cwd: appOutDir}); const child = child_process.exec(`mv ${appName} ${appName}.bin`, {cwd: appOutDir});
@@ -19,7 +19,7 @@ async function afterPack ({targets, appOutDir}) {
resolve(); resolve();
}); });
}).then(() => { }).then(() => {
fs.writeFileSync (scriptPath, script); fs.writeFileSync(scriptPath, script);
child_process.exec(`chmod +x ${appName}`, {cwd: appOutDir}); child_process.exec(`chmod +x ${appName}`, {cwd: appOutDir});
}); });
} }