mozilla / tofino

Project Tofino is a browser interaction experiment.
https://mozilla.github.io/tofino
Apache License 2.0
647 stars 68 forks source link

yargs can't handle the way process.argv looks in some electron contexts. #860

Closed Mossop closed 8 years ago

Mossop commented 8 years ago

yargs assumes that process.argv is [node_path, initial_js, ...rest] so it strips the first two parts of the array and processes the rest (https://github.com/yargs/yargs/blob/master/index.js#L6).

But in electron, particularly when we run as a packaged app process.argv is actually [tofino.exe, ...rest] so we lose the first argument and this breaks events coming from squirrel's installer.

victorporof commented 8 years ago

:(