fix: electron path for postinstall (#14177)

* fix #14127 issue caused by #12426

* add ELECTRON_OVERRIDE_DIST_PATH check for install.js
This commit is contained in:
Keerthi Niranjan 2018-08-19 22:10:12 +05:30 committed by Shelley Vohr
parent 466fe816d5
commit 59e118925a

View file

@ -17,7 +17,9 @@ try {
var platformPath = getPlatformPath()
if (installedVersion === version && fs.existsSync(path.join(__dirname, platformPath))) {
var electronPath = process.env.ELECTRON_OVERRIDE_DIST_PATH || path.join(__dirname, 'dist', platformPath)
if (installedVersion === version && fs.existsSync(electronPath)) {
process.exit(0)
}