[SVN] Re: Sync output from TextMate::Process.run ?
ld at ldaley.com
Sun Nov 15 08:51:14 UTC 2009
This is always trick because of the level of indirection.
Is the output from your command multiline?
On 15/11/2009, at 6:34 PM, Stray <dailystraying at googlemail.com> wrote:
> Unfortunately yes... didn't make a difference. In the script only
> version, granularity => makes it add a letter at a time, but in the
> command it's just the same - no output from the git pull reaches the
> html pane until the process is complete.
> On 14 Nov 2009, at 23:01, Luke Daley wrote:
>> Have you tried passing :granularity => 1 to Process.run()?
>> Check the docs in the file for what it means.
>> On 13/11/2009, at 9:41 PM, Stray wrote:
>>> I'm developing a bundle for RobotLegs AS3 projects, mostly using
>>> I have a command, 'Create New RobotLegs Project', which sets up
>>> directories and files, pulling the required code libraries from
>>> When the script clones the git repository, the output is sync if I
>>> a .rb script (using the Ruby Bundle's Run command in TextMate), but
>>> when I paste that script direct into the tmCommand, the git output
>>> suppressed until the end of the clone, when it all comes through in
>>> one go. It all works as a command, but I don't get the feedback in
>>> real time.
>>> Relevant part of the code is:
>>> args = ["clone", "-v", "git://github.com/robotlegs/robotlegs-
>>> ", "robotlegs/"]
>>> TextMate::Process.run("git", args, :interactive_input => false)
>>> do |
>>> STDOUT.puts str
>>> I have STDOUT.sync = true higher up in the script.
>>> I have also tried
>>> STDOUT << str
>>> puts str
>>> They both work, but are also stalled until the end of the clone
>>> To be clear - when running the script normally, the 'STDOUT.puts
>>> line executes in real time, but when running the command all the
>>> output comes through in one block at the end. The code in the
>>> is identical to the code in the .rb script. I am including the
>>> html_header and using <pre/> around this output.
>>> I'm aware that I could try TextMate::Executor.run as well, but I'd
>>> much rather keep the actual ruby code in the command itself where
>>> easier for the Bundle's users to tweak it to suit them.
>>> Does anyone have any ideas? I'm really out of them...
>>> textmate-dev mailing list
>>> textmate-dev at lists.macromates.com
>> textmate-dev mailing list
>> textmate-dev at lists.macromates.com
> textmate-dev mailing list
> textmate-dev at lists.macromates.com
More information about the textmate-dev