Johannes Rauh
2016-Dec-06 15:28 UTC
[Rd] system2 fails with quiet=TRUE, but runs through with quiet=FALSE
Hi, I have recently tried to check the test coverage using library("covr") and, interestingly, the command> covr::package_coverage()fails, while> covr::package_coverage(quiet = FALSE)runs through without problem. I traced the problem to a call to utils::install.packages(), where the option quiet is passed on. In utils::install.packages(), the problem seems to lie in the following call of system2(): output <- if (quiet) FALSE else "" [...] status <- system2(cmd0, args, env = env, stdout = output, stderr = output) Manually changing stdout to "" makes the program run through without error (but then the output is there again, of course...). The function system2 seems to be a wrapper around .Internal(system(command, flags, f, stdout, stderr)) In this call, if quiet = TRUE, then flags <- 21, otherwise flags <- 22. stdout and stderr are passed through from system2. I should mention that I am working with R 3.3.1 on Windows 8. Does anyone have an idea what the flags mean and how they can make a system call fail? Best Johannes
Reasonably Related Threads
- utils::install.packages with quiet=TRUE fails for source packages on Windows
- utils::install.packages with quiet=TRUE fails for source packages on Windows
- utils::install.packages with quiet=TRUE fails for source packages on Windows
- Problem with system2(), directing STDERR to a file
- Capture output of install.packages (pipe system2)