Skip to content

Commit

Permalink
Bug fixes installing PlatformIO in macOS (Issue: #124)
Browse files Browse the repository at this point in the history
  • Loading branch information
gepd committed Jul 3, 2017
1 parent e918265 commit 0360d34
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion beginning/pio_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def install(self):
out = run_command(cmd, "setup_error", self.OUTPUT_PATH)

# Install pio
if(sublime.platform() is 'osx'):
if(sublime.platform() == 'osx'):
executable = path.join(self.V_ENV_BIN_PATH, self.SYMLINK)
cmd = ['"%s"' % (executable), '-m', 'pip',
'install', '-U', 'platformio']
Expand Down
4 changes: 2 additions & 2 deletions libraries/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ def create_command(command):
if(not env_path):
return command

_os = platform()
os = platform()

if(_os is 'osx'):
if(os == 'osx'):
exe = 'python' if(not symlink) else 'python2'
options = ['-m', command[0]]
else:
Expand Down
2 changes: 1 addition & 1 deletion platformio/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def run_command(self, command, prepare=True):

def prepare_command(self, post_command):
cmd = " ".join(post_command)
command = create_command(['pio', '-f', '-c', 'sublimetext'])
command = create_command(['platformio', '-f', '-c', 'sublimetext'])
command.extend(post_command)

# verbose mode
Expand Down
10 changes: 5 additions & 5 deletions platformio/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ def update_pio(self):
self.show_feedback()
self.dprint("searching_pio_updates")

cmd = ['pio','upgrade']
out = self.run_command(cmd, prepare=False)
cmd = ['upgrade']
out = self.run_command(cmd)

def update_async(self):
"""New Thread Execution
Expand Down Expand Up @@ -100,7 +100,7 @@ def developer_pio(self):
self.dprint("installing_stable_pio")
option = 'platformio'

cmd = ['pip','install', '-U', option]
cmd = create_command(['pip','install', '-U', option])
out = self.run_command(cmd, prepare=False)

def check_update_async(self):
Expand Down Expand Up @@ -178,5 +178,5 @@ def check_update(self):
self.show_feedback()
self.realtime = True

cmd = ['pio','upgrade']
out = self.run_command(cmd, prepare=False)
cmd = ['upgrade']
out = self.run_command(cmd)

0 comments on commit 0360d34

Please sign in to comment.