I set up an exec action that would run the ruby gist command a the command line:
<binding key="f12" command="exec '' 'gist.bat --simple "$File"" />
When I ran it, it would hang. I found it was hanging on this line in the gist code:
if $stdin.tty?
# Run without stdin.
...
else
# Read from standard input.
input = $stdin.read
end
In other words, $stdin.tty is returning false, and it’s waiting to read from $stdin. I just want it to read from the file I provide in the exec line, so this doesn’t work for me. I ended up commenting the if/else code out, so it would run without stdin.
I’m not calling this a bug in Sublime. I just really don’t understand what’s causing this, or if there is a way to fix it without commenting out the code.
Thanks,