aboutsummaryrefslogtreecommitdiff
path: root/commands/upgrade.js
diff options
context:
space:
mode:
Diffstat (limited to 'commands/upgrade.js')
-rw-r--r--commands/upgrade.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/commands/upgrade.js b/commands/upgrade.js
index c6ebbec..01f6be9 100644
--- a/commands/upgrade.js
+++ b/commands/upgrade.js
@@ -128,9 +128,11 @@ module.exports = async (argv) => {
if (os.platform() === "win32" && typeof pkg.executable.windows === "string") {
fs.writeFileSync(os.homedir() + "/.twilight/binaries/" + pkg.id + ".bat", pkg.executable.windows);
} else if (os.platform() === "linux" && typeof pkg.executable.linux === "string") {
- fs.writeFileSync(os.homedir() + "/.twilight/binaries/" + pkg.id + ".sh", pkg.executable.linux);
+ fs.writeFileSync(os.homedir() + "/.twilight/binaries/" + exec, pkg.executable.linux);
+ require('child_process').spawnSync("chmod", [ "+x", os.homedir() + "/.twilight/binaries/" + exec ])
} else if (os.platform() === "darwin" && typeof pkg.executable.mac === "string") {
- fs.writeFileSync(os.homedir() + "/.twilight/binaries/" + pkg.id + ".sh", pkg.executable.mac);
+ fs.writeFileSync(os.homedir() + "/.twilight/binaries/" + exec, pkg.executable.mac);
+ require('child_process').spawnSync("chmod", [ "+x", os.homedir() + "/.twilight/binaries/" + exec ])
}
let postinstall = [];