Skip to content

Commit c45adca

Browse files
committed
fix(deb): Can't run generated app due to wrong permission
Closes #786
1 parent 7a5252c commit c45adca

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

package.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
"tunnel-agent": "^0.4.3",
9696
"update-notifier": "^1.0.2",
9797
"uuid-1345": "^0.99.6",
98-
"yargs": "^5.0.0"
98+
"yargs": "^6.0.0"
9999
},
100100
"optionalDependencies": {
101101
"appdmg-tf": "0.4.9"
@@ -118,7 +118,7 @@
118118
"ava-tf": "^0.16.0",
119119
"babel-plugin-array-includes": "^2.0.3",
120120
"babel-plugin-transform-es2015-destructuring": "^6.16.0",
121-
"babel-plugin-transform-es2015-parameters": "^6.16.0",
121+
"babel-plugin-transform-es2015-parameters": "^6.17.0",
122122
"babel-plugin-transform-es2015-spread": "^6.8.0",
123123
"decompress-zip": "^0.3.0",
124124
"diff": "^3.0.0",
@@ -148,8 +148,5 @@
148148
"release": {
149149
"verifyConditions": []
150150
},
151-
"typings": "./out/electron-builder.d.ts",
152-
"publishConfig": {
153-
"tag": "next"
154-
}
151+
"typings": "./out/electron-builder.d.ts"
155152
}

src/packager/dirPackager.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Promise as BluebirdPromise } from "bluebird"
2-
import { emptyDir, copy } from "fs-extra-p"
2+
import { emptyDir, copy, chmod } from "fs-extra-p"
33
import { warn } from "../util/log"
44
import { PlatformPackager } from "../platformPackager"
55
import { debug7zArgs, spawn } from "../util/util"
@@ -45,6 +45,15 @@ export async function pack(packager: PlatformPackager<any>, out: string, platfor
4545
await copy(path.resolve(packager.info.projectDir, electronDist, "Electron.app"), path.join(out, "Electron.app"))
4646
}
4747

48+
if (platform === "linux") {
49+
// https://github.com/electron-userland/electron-builder/issues/786
50+
// fix dir permissions — opposite to extract-zip, 7za creates dir with no-access for other users, but dir must be readable for non-root users
51+
await BluebirdPromise.all([
52+
chmod(path.join(out, "locales"), "0755"),
53+
chmod(path.join(out, "resources"), "0755")
54+
])
55+
}
56+
4857
if (platform === "darwin" || platform === "mas") {
4958
await(<any>require("./mac")).createApp(packager, out, initializeApp)
5059
}

0 commit comments

Comments
 (0)