Newer
Older
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
Amaury Martiny
committed
import { DEFAULT_CHAIN } from '../constants';
Amaury Martiny
committed
Luke Schoen
committed
const { productName } = require('../../../../electron-builder.json');
const { version } = require('../../../../package.json');
/**
* Process.argv arguments length is different in electron mode and in packaged
* mode. This small line is to harmonize the behavior for consistent parsing.
*
* @see https://github.com/tj/commander.js/issues/512
* @see https://github.com/electron/electron/issues/4690#issuecomment-217435222
*/
if (process.defaultApp !== true) {
`The network to connect to, can be one of "foundation", "kovan" or "ropsten". (default: "${DEFAULT_CHAIN}")`,
DEFAULT_CHAIN
'--ipc-path <path>',
`${productName} will not attempt to run the bundled Parity Ethereum, and will connect to the specified IPC socket instead. All IPC APIs must be enabled.`
// We want to ignore some flags that are sometimes passed to Fether, but not
// officially recognized by Fether:
// - -psn_*: https://github.com/paritytech/fether/issues/188
.parse(process.argv.filter(arg => !arg.startsWith('-psn_')));