From eecd524788a4b5e959b8b99d4036d8f72374b92b Mon Sep 17 00:00:00 2001 From: Michelle Tilley Date: Thu, 21 Sep 2017 14:57:33 -0700 Subject: [PATCH] Differenter --- spec/main-process/parse-command-line.test.js | 4 ++-- src/main-process/parse-command-line.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/main-process/parse-command-line.test.js b/spec/main-process/parse-command-line.test.js index 8b33ebea9..b91ad866f 100644 --- a/spec/main-process/parse-command-line.test.js +++ b/spec/main-process/parse-command-line.test.js @@ -5,7 +5,7 @@ import parseCommandLine from '../../src/main-process/parse-command-line' describe('parseCommandLine', function () { describe('when --url-handler is not passed', function () { it('parses arguments as normal', function () { - const args = parseCommandLine(['-d', '--safe', '--test', 'atom://test/url', 'atom://other/url', '/some/path']) + const args = parseCommandLine(['-d', '--safe', '--test', '/some/path', 'atom://test/url', 'atom://other/url']) assert.isTrue(args.devMode) assert.isTrue(args.safeMode) assert.isTrue(args.test) @@ -16,7 +16,7 @@ describe('parseCommandLine', function () { describe('when --url-handler is passed', function () { it('ignores other arguments and limits to one URL', function () { - const args = parseCommandLine(['-d', '--url-handler', '--safe', '--test', 'atom://test/url', 'atom://other/url', '/some/path']) + const args = parseCommandLine(['-d', '--url-handler', '--safe', '--test', '/some/path', 'atom://test/url', 'atom://other/url']) assert.isUndefined(args.devMode) assert.isUndefined(args.safeMode) assert.isUndefined(args.test) diff --git a/src/main-process/parse-command-line.js b/src/main-process/parse-command-line.js index 6f7ffa9fd..67d238883 100644 --- a/src/main-process/parse-command-line.js +++ b/src/main-process/parse-command-line.js @@ -67,7 +67,7 @@ module.exports = function parseCommandLine (processArgs) { args = { urlHandler: true, 'url-handler': true, - _: args._.slice(0, 1) + _: args._.filter(str => str.startsWith('atom://')).slice(0, 1) } }