From b12783910af8c6169007eb8fe85cc30d27c309c3 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 22 May 2018 19:31:29 -0400 Subject: [PATCH] make downloaded update executable --- src/commands/update.command.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/commands/update.command.ts b/src/commands/update.command.ts index dc2f74d93b8..0eb6b0d2912 100644 --- a/src/commands/update.command.ts +++ b/src/commands/update.command.ts @@ -1,5 +1,6 @@ import * as AdmZip from 'adm-zip'; import * as program from 'commander'; +import * as fs from 'fs'; import * as fetch from 'node-fetch'; import * as path from 'path'; @@ -63,6 +64,9 @@ export class UpdateCommand { const zip = new AdmZip(zipBuffer); const currentDir = this.inPkg ? path.dirname(process.execPath) : __dirname; zip.extractAllTo(currentDir, true); + if (process.platform !== 'win32') { + fs.chmodSync(path.join(currentDir, 'bw'), 764); + } res.title = 'Updated self to ' + tagName + '.'; if (responseJson.body != null && responseJson.body !== '') { res.message = responseJson.body;