callr-org / website

http://callr.org
6 stars 0 forks source link

'install' outputs to standard output; should be standard error #2

Open HenrikBengtsson opened 9 years ago

HenrikBengtsson commented 9 years ago

The 'install' script outputs also to std. out. This renders it "useless" in report generators, since such output will clutter up the report. Should be redirected to std. err., e.g.

$ Rscript -e "source('http://callr.org/install#R.devices')" > log.out 2> log.err
$ ls -l log.*
-rwx------+ 1 4294967295 mkpasswd  201 Jan 28 11:28 log.err
-rwx------+ 1 4294967295 mkpasswd 6667 Jan 28 11:28 log.out
$ head log.out
abind :
 Version 1.4-0 installed in C:/Users/hb/R/win-library/3.2
 Version 1.4-1 available at http://R-Forge.R-project.org
Update (y/N/c)?
base64 :
 Version 1.1 installed in C:/Users/hb/R/win-library/3.2
 Version 1.2 available at http://R-Forge.R-project.org
Update (y/N/c)?
bbmle :
 Version 1.0.17 installed in C:/Users/hb/R/win-library/3.2
Installing/updating package: 'R.devices'
HenrikBengtsson commented 9 years ago

Those messages are sent to standard output by the utils package.

HenrikBengtsson commented 9 years ago

I've inquired about this in R-devel thread '[Rd] install.packages() / update.packages() sometimes outputs to stdout and sometimes to stderr [and menu() & readline()]' on 2015-05-17.