Calls editor using exec
(OSX fix)
#1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Sets
proc.StartInfo.UseShellExecute
to false so that the editor binary is called directly withexec
instead of being launched with the system launcher.I was trying to use this shim to glue Unity and Sublime Text 2 together in OSX. In the original source, the binary and arguments were passed to the OSX
open
command, which interpreted the file:line argument as another command to run. This pull request lets the shim run successfully with a line likemono UnityExternalScriptEditorHelper.exe /path/to/file.cs;10
at the command prompt.Unfortunately, Unity for OSX doesn't recognize individual binaries or executable scripts when selecting an external script editor. It requires an app bundle. I wrote a shell script to call mono and this application, then tried many different ways of packaging that script into an app bundle, but the file:line argument never seemed to make it from Unity to the shell script.
So the last mile is still missing. These changes just clear up the errors. 😿 Maybe there's a better way to turn this mono app into a bundle.