Skip to content

Commit

Permalink
Make sure to wait for build process
Browse files Browse the repository at this point in the history
Even if it happens to close the stdout + stderr
connections before the check process actually
exits.

Should close #139.
  • Loading branch information
gaborcsardi committed Sep 9, 2021
1 parent 8f2a041 commit fae9561
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/build.R
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit fae9561

Please sign in to comment.