mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-23 19:26:33 +00:00
Make sure CLI args are parsed correctly when spawning in OS X (#383)
The binary used when spawning the CLI in OS X during development is `electron-prebuilt/disk/Electron.app/Contents/MacOS/Electron`. To make sure we catch both `Electron` and `electron`, make the executable name lowercase before comparing it. Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
This commit is contained in:
parent
36bd696da9
commit
087a008d0d
@ -130,7 +130,7 @@ module.exports = yargs
|
|||||||
|
|
||||||
// Excluding the extension makes sure we cover cases
|
// Excluding the extension makes sure we cover cases
|
||||||
// like *.exe and *.cmd in Windows systems.
|
// like *.exe and *.cmd in Windows systems.
|
||||||
const executable = path.basename(argv[0], path.extname(argv[0]));
|
const executable = path.basename(argv[0], path.extname(argv[0])).toLowerCase();
|
||||||
|
|
||||||
if (executable === 'node' || executable === 'electron') {
|
if (executable === 'node' || executable === 'electron') {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user