From 359625d9204a5884762992a508c9267cd898e371 Mon Sep 17 00:00:00 2001 From: danmosemsft Date: Sun, 18 Oct 2015 13:05:14 -0700 Subject: [PATCH] Remove empty array entry causing chrome to open wrong location --- swi.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/swi.py b/swi.py index c723c10..be6411b 100644 --- a/swi.py +++ b/swi.py @@ -159,16 +159,18 @@ def run(self): if key == "windows" and (sublime.arch() == "x64" or sublime.executable_path().find('(x86)') >= 0): key += "_x64" - url = utils.get_setting('chrome_url') - if url == None: - url = '' + cmd = [os.getenv('GOOGLE_CHROME_PATH', '') + utils.get_setting('chrome_path')[key], '--remote-debugging-port=' + utils.get_setting('chrome_remote_port')] profile = utils.get_setting('chrome_profile') or '' if profile: profile = '--user-data-dir=' + profile + cmd.append(profile) + + url = utils.get_setting('chrome_url') or '' + cmd.append(url) self.window.run_command('exec', { - "cmd": [os.getenv('GOOGLE_CHROME_PATH', '') + utils.get_setting('chrome_path')[key], '--remote-debugging-port=' + utils.get_setting('chrome_remote_port'), profile, url] + "cmd": cmd })