2019-07-13 10:05:04 -07:00
|
|
|
#!/usr/bin/env node
|
|
|
|
|
|
2019-08-27 10:54:01 -07:00
|
|
|
/**
|
|
|
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
|
|
|
*
|
|
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
|
|
|
|
*
|
|
|
|
|
* @flow
|
|
|
|
|
*/
|
2019-07-13 10:05:04 -07:00
|
|
|
|
|
|
|
|
const electron = require('electron');
|
|
|
|
|
const spawn = require('cross-spawn');
|
|
|
|
|
const argv = process.argv.slice(2);
|
|
|
|
|
const pkg = require('./package.json');
|
|
|
|
|
const updateNotifier = require('update-notifier');
|
|
|
|
|
|
|
|
|
|
// notify if there's an update
|
2019-08-13 17:58:03 -07:00
|
|
|
updateNotifier({pkg}).notify({defer: false});
|
2019-07-13 10:05:04 -07:00
|
|
|
|
|
|
|
|
const result = spawn.sync(electron, [require.resolve('./app')].concat(argv), {
|
|
|
|
|
stdio: 'ignore',
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
process.exit(result.status);
|