Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

xwalk_android_dl doesn't work when output directed through a pipe #49

Closed
davidmaxwaterman opened this issue Mar 20, 2014 · 1 comment · Fixed by #50
Closed

xwalk_android_dl doesn't work when output directed through a pipe #49

davidmaxwaterman opened this issue Mar 20, 2014 · 1 comment · Fixed by #50

Comments

@davidmaxwaterman
Copy link
Contributor

eg :

$ xwalk_android_dl -a arm |& ts
Mar 20 13:30:27 fetching xwalk-android using parameters:
Mar 20 13:30:27   architecture = arm
Mar 20 13:30:27   channel = beta
Mar 20 13:30:27   version = 4.32.76.5
Mar 20 13:30:27   url = https://download.01.org/crosswalk/releases/android-arm/beta/crosswalk-4.32.76.5-arm.zip
Mar 20 13:30:27 starting download of https://download.01.org/crosswalk/releases/android-arm/beta/crosswalk-4.32.76.5-arm.zip
Mar 20 13:30:28 
Mar 20 13:30:28 /home/davidmaxwaterman/z/crosswalk-apk-generator/node_modules/q/q.js:126
Mar 20 13:30:28                     throw e;
Mar 20 13:30:28                           ^
Mar 20 13:30:28 TypeError: Object #<Socket> has no method 'clearLine'
Mar 20 13:30:28     at ConsoleLogger.replace (/home/davidmaxwaterman/z/crosswalk-apk-generator/src/console-logger.js:58:18)
Mar 20 13:30:28     at /home/davidmaxwaterman/z/crosswalk-apk-generator/src/archive-fetcher.js:88:19
Mar 20 13:30:28     at _progressed (/home/davidmaxwaterman/z/crosswalk-apk-generator/node_modules/q/q.js:817:51)
Mar 20 13:30:28     at /home/davidmaxwaterman/z/crosswalk-apk-generator/node_modules/q/q.js:843:24
Mar 20 13:30:28     at /home/davidmaxwaterman/z/crosswalk-apk-generator/node_modules/q/q.js:612:17
Mar 20 13:30:28     at flush (/home/davidmaxwaterman/z/crosswalk-apk-generator/node_modules/q/q.js:108:17)
Mar 20 13:30:28     at process._tickCallback (node.js:415:13)

I'm guessing this is the progress output...perhaps it doesn't make sense when output is directed through a pipe? Note that my real usage is that xwalk_android_dl is part of a script, and I was redirecting the output of the whole script through ts so I could see how long each part takes.

Perhaps it could do with a 'quiet' option?

@townxelliot
Copy link
Contributor

Yes, a --quiet option would make sense. I may have a look and see if I'm doing it right, because I would have thought that tools which do progress output should still work with a pipe. I probably need to implement some interface in ConsoleLogger so it can properly replace console.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants