aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2023-03-30 14:35:30 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2023-03-30 14:35:30 +0200
commit1933b9c60ddd1eb7c30266dbf8a90aefd9f43c14 (patch)
treedf0b84ed027b70d5f7222af182f3b66d1eee7414
parent84d8e7892c52781446e7d77dbe37338976920ab7 (diff)
Redirect apt-get {update,install} stdout to stderr
-rw-r--r--bpkg/system-package-manager-debian.cxx14
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);