1 |
|
2 |
|
3 | /**
|
4 | * Copyright (c) Facebook, Inc. and its affiliates.
|
5 | *
|
6 | * This source code is licensed under the MIT license found in the
|
7 | * LICENSE file in the root directory of this source tree.
|
8 | *
|
9 | * @flow
|
10 | */
|
11 |
|
12 | const electron = require('electron');
|
13 | const spawn = require('cross-spawn');
|
14 | const argv = process.argv.slice(2);
|
15 | const pkg = require('./package.json');
|
16 | const updateNotifier = require('update-notifier');
|
17 |
|
18 | // notify if there's an update
|
19 | updateNotifier({pkg}).notify({defer: false});
|
20 |
|
21 | const result = spawn.sync(electron, [require.resolve('./app')].concat(argv), {
|
22 | stdio: 'ignore',
|
23 | });
|
24 |
|
25 | process.exit(result.status);
|