diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2023-03-30 14:35:30 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2023-03-30 14:35:30 +0200 |
commit | 1933b9c60ddd1eb7c30266dbf8a90aefd9f43c14 (patch) | |
tree | df0b84ed027b70d5f7222af182f3b66d1eee7414 | |
parent | 84d8e7892c52781446e7d77dbe37338976920ab7 (diff) |
Redirect apt-get {update,install} stdout to stderr
-rw-r--r-- | bpkg/system-package-manager-debian.cxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/bpkg/system-package-manager-debian.cxx b/bpkg/system-package-manager-debian.cxx index b029901..08767d3 100644 --- a/bpkg/system-package-manager-debian.cxx +++ b/bpkg/system-package-manager-debian.cxx @@ -792,7 +792,12 @@ namespace bpkg process pr; if (!simulate_) - pr = process (pp, args); + { + // Redirect stdout to stderr since apt-get prints some of its + // diagnostics to stdout. + // + pr = process (pp, args, 0 /* stdin */, 2 /* stdout */); + } else { print_process (args); @@ -854,7 +859,12 @@ namespace bpkg process pr; if (!simulate_) - pr = process (pp, args); + { + // Redirect stdout to stderr since apt-get prints some of its + // diagnostics to stdout. + // + pr = process (pp, args, 0 /* stdin */, 2 /* stdout */); + } else { print_process (args); |