Skip to content

Commit

Permalink
Remove empty array entry causing chrome to open wrong location
Browse files Browse the repository at this point in the history
  • Loading branch information
danmoseley committed Oct 18, 2015
1 parent 0692a96 commit 359625d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions swi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
})


Expand Down

0 comments on commit 359625d

Please sign in to comment.