Closed bryanhiestand closed 8 years ago
Interesting... I don't believe we do any processing of the path and pass it directly to the process spawn.
It looks like the problem might be with Shellwords
usage..?
Is it possible to get rid of the script wrapper now? I think that there were some bug fixes and features added to the Node PTY implementation which makes it basically usable. We should check out if it's possible now.
@huba I guess the problem is with this line:
The problem is that the path is not escaped so it gets borked when Shellwords.split
is called.
The simplest solution might be to call Shellwords.escape
on editor.getPath()
but a better solution might be to call Shellwords.split
on cmd
earlier and work with the array (which would be slightly cleaner and more efficient).
@huba the only other thing to consider is https://github.com/ioquatix/script-runner/blob/072cd316d7beb46333e029e8e771fbe1cb0458f3/lib/script-runner-process.coffee#L50 where we print out the command being executed. It would be nice if this was a command you could copy and paste into a terminal and have it work the same way..
When opening a python script, whether w/ atom from Terminal or opening file GUI, script-runner errors out. This does not occur in script or when running python directly from terminal:
Running: python /private/tmp/space between/entertainment_center.py (pgid 61667)
python: can't open file '/private/tmp/space': [Errno 2] No such file or directory