fix(windows): start fix in some cases (possible win7 fix)

This commit is contained in:
Alexey Kasyanchuk 2018-02-12 10:08:50 +03:00
parent 4a855104b1
commit 464da346d1

View File

@ -10,6 +10,10 @@ export default (app) => {
return `./${app}.exe`
}
if(/^win/.test(process.platform) && fs.existsSync(path.dirname(process.execPath) + `/${app}.exe`)) {
return path.dirname(process.execPath) + `/${app}.exe`
}
if (fs.existsSync(fs.realpathSync(__dirname) + `/${app}`)) {
return fs.realpathSync(__dirname) + `/${app}`
}