React: fix package script

This commit is contained in:
DC
2016-07-22 19:57:06 -07:00
parent 793ea79cab
commit d20786cd69
5 changed files with 12 additions and 3 deletions

View File

@@ -66,7 +66,7 @@ module.exports = {
IS_PRODUCTION: isProduction(),
POSTER_PATH: path.join(getConfigPath(), 'Posters'),
ROOT_PATH: __dirname,
ROOT_PATH: path.join(__dirname, '..'),
STATIC_PATH: path.join(__dirname, '..', 'static'),
TORRENT_PATH: path.join(getConfigPath(), 'Torrents'),

View File

@@ -22,9 +22,11 @@ var windows = require('./windows')
var shouldQuit = false
var argv = sliceArgv(process.argv)
if (!argv.includes('--dev')) process.env.NODE_ENV = 'production'
if (process.platform === 'win32') {
shouldQuit = squirrelWin32.handleEvent(argv[0])
argv = argv.filter((arg) => arg.indexOf('--squirrel') === -1)
argv = argv.filter((arg) => !arg.includes('--squirrel'))
}
if (!shouldQuit) {