From 087a008d0dffb804fdae44163d5b36379f71a900 Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Fri, 29 Apr 2016 11:55:23 -0400 Subject: [PATCH] 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 --- lib/cli/cli.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cli/cli.js b/lib/cli/cli.js index 8556d257..bec5620a 100644 --- a/lib/cli/cli.js +++ b/lib/cli/cli.js @@ -130,7 +130,7 @@ module.exports = yargs // Excluding the extension makes sure we cover cases // 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') {