-
Notifications
You must be signed in to change notification settings - Fork 33
Conversation
!arg.startsWith('--ws-interface') | ||
) | ||
); | ||
.parse(process.argv); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My hunch is that Electron or MacOs would be pass down flags to Electron, which are unexpected on our side and would make the program exit with error code != 0 (because we don't allow unknown arguments anymore). I think I would keep the filtering of process.argv
?
parse(
process.argv
// We want to ignore some flags and not pass them down to Parity:
// --inspect: `electron-webpack dev` runs Electron with the `--inspect` flag for HMR
// -psn_*: https://github.com/paritytech/fether/issues/188
// --ws-interface: we don't pass down this flag, because fether only allows 127.0.0.1 as WS interface
.filter(
arg =>
!arg.startsWith('--inspect') &&
!arg.startsWith('-psn_') &&
!arg.startsWith('--ws-interface')
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that --inspect
is not passed by electron-webpack
anymore, so we can remove that one. --ws-interface
has been removed.
You're probably right, i'll keep arg => !arg.startsWith('-psn_')
just to be sure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested with yarn electron --chain kovan
successfully.
fix #550
Only two flags possible:
--chain
--no-run-parity
: kept this one, iirc was requested a couple of times in parity ui, and harmlessAny other flags will exit Fether with error code != 0.