From d792bad1fc4d524fc95b05dfeb51453317f55727 Mon Sep 17 00:00:00 2001 From: Bing Yang Date: Fri, 27 Aug 2021 09:16:55 -0400 Subject: [PATCH 1/2] fix: ensure control directory has right permissions --- src/installer.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/installer.js b/src/installer.js index 66c4810..f0f5743 100644 --- a/src/installer.js +++ b/src/installer.js @@ -91,7 +91,13 @@ class DebianInstaller extends common.ElectronInstaller { const dest = path.join(this.stagingDir, 'DEBIAN', 'control') this.options.logger(`Creating control file at ${dest}`) - return common.wrapError('creating control file', async () => this.createTemplatedFile(src, dest)) + return common.wrapError('creating control file', async () => { + + await this.createTemplatedFile(src, dest); + + const contrlDir = path.join(this.stagingDir, 'DEBIAN'); + return fs.chmod(contrlDir, 0o755); + }) } /** From 0d02201dd8ac1ab6513ccdd2fb5a55b9bbe61a26 Mon Sep 17 00:00:00 2001 From: Bing Yang Date: Fri, 27 Aug 2021 11:29:36 -0400 Subject: [PATCH 2/2] correct spelling contrlDir -> controlDir. --- src/installer.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/installer.js b/src/installer.js index f0f5743..358abf3 100644 --- a/src/installer.js +++ b/src/installer.js @@ -92,11 +92,10 @@ class DebianInstaller extends common.ElectronInstaller { this.options.logger(`Creating control file at ${dest}`) return common.wrapError('creating control file', async () => { + await this.createTemplatedFile(src, dest) - await this.createTemplatedFile(src, dest); - - const contrlDir = path.join(this.stagingDir, 'DEBIAN'); - return fs.chmod(contrlDir, 0o755); + const controlDir = path.join(this.stagingDir, 'DEBIAN') + return fs.chmod(controlDir, 0o755) }) }