fix: electron path for postinstall (backport: 3-0-x) (#14197)

* fix #14127 issue caused by #12426

* add ELECTRON_OVERRIDE_DIST_PATH check for install.js
This commit is contained in:
trop[bot] 2018-08-19 12:54:39 -07:00 committed by Shelley Vohr
parent 92f3d47ab3
commit 4e3aa2e061

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)
}