From fae956157e4901c937292fbf368e54dab0eb939c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Cs=C3=A1rdi?= Date: Thu, 9 Sep 2021 13:16:03 +0200 Subject: [PATCH] Make sure to wait for build process Even if it happens to close the stdout + stderr connections before the check process actually exits. Should close #139. --- R/build.R | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/R/build.R b/R/build.R index e74bf19..57b6b33 100644 --- a/R/build.R +++ b/R/build.R @@ -15,7 +15,9 @@ build_package <- function(path, tmpdir, build_args, libpath, quiet) { proc <- pkgbuild_process$new(path, tmpdir, args = build_args) on.exit(proc$kill(), add = TRUE) callback <- detect_callback() - while (proc$is_incomplete_output() || proc$is_incomplete_error()) { + while (proc$is_incomplete_output() || + proc$is_incomplete_error() + || proc$is_alive()) { proc$poll_io(-1) out <- proc$read_output() err <- proc$read_error()