cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Mocny <mmo...@chromium.org>
Subject Re: Grabbing logs from superspawn.js in cordova-lib
Date Mon, 24 Nov 2014 22:02:42 GMT
Try passing { stdio: 'default' } to your call to `run` and you should get
the output as a string as part of the callback.  This will come as one
block at the end of the script, not as a stream, hopefully that will
suffice.

It looks like the fixture-stdout library you tried works by decorating
process.stdout, which only applies to the current process.  { stdio:
'inherit' } is the option superspawn uses to direct sub-process io to the
same destination as the current process, it doesn't actually appear to pipe
output through the current process (probably a good thing).  If you require
a stream and want to inspect that, based on my reading of the underlying
spawn() options (
http://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options),
this should be possible to add as well.

If you need to modify superspawn to support custom output piping, I would
be happy to take a look at a PR.

-Michal

On Fri, Nov 21, 2014 at 11:55 AM, Matt Steele <orphum@gmail.com> wrote:

> Hi all, sorry for the cross-post, but I wasn't sure if this was a
> StackOverflow question or something that belonged on the dev list.
>
> Basically I'm looking for a way to capture the ant/xcodebuild/etc output
> that's emitted by superspawn.js inside cordova-lib in the compile phase. So
> far I haven't had any luck:
>
>
> http://stackoverflow.com/questions/27050325/is-there-a-way-to-get-a-cordova-builds-stdout-using-cordova-lib
>
> Any suggestions would be appreciated. Thanks!
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message