Skip to content

Commit

Permalink
Fix issue with spaces and special characters in pathnames on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Perry Clarke committed Sep 28, 2017
1 parent 226d425 commit afa4543
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
12 changes: 10 additions & 2 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@

Always check the [README](https://github.com/coronalabs/CoronaSDK-SublimeText/blob/master/README.md) for the latest information.

### 1.6.2
### 1.7.2

* Fixed issue with inline function definition syntax coloring (fixes #20)
* Fix issue with spaces and special characters in pathnames on macOS

### 1.7.1

* Fix issue where 'Run Project' didn't work on Windows

### 1.7.0

* Fix issue with inline function definition syntax coloring (fixes #20)

* Look for the Simulator in the new "Corona" location (rather than "CoronaSDK") (fixes #23)

Expand Down
11 changes: 8 additions & 3 deletions run_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,16 @@ def run(self):
# On OS X, running the command as a string argument to the shell allows
# the "corona_sdk_simulator_show_console" option to work (otherwise
# stdout gets screwed up and hangs)
cmd = ["'" + simulator_path + "'"]
try: # py3
from shlex import quote
except ImportError: # py2
from pipes import quote

cmd = [ simulator_path ]
cmd += simulator_flags
cmd.append(mainlua)
cmdStr = " ";
cmdStr = cmdStr.join(cmd)
# quote command arguments
cmdStr = ' '.join([ quote(arg) for arg in cmd ])
self.window.run_command('exec', {'cmd': cmdStr, "file_regex": "^(?:ERROR: |WARNING: )*(/[^:]*):([0-9]+):([0-9]?)(.*)$", "shell": "/bin/sh"})
else: # windows
cmd = [ simulator_path ]
Expand Down

0 comments on commit afa4543

Please sign in to comment.