This used to work up until v0.32.0 but regressed during the
style rewrite at: c4917c1a54f4ee51638d45090836fff0055d3c8d
---
test_main.c | 9 +++++++++
u-config.c | 4 ++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/test_main.c b/test_main.c
index 42db89f..162ee92 100644
--- a/test_main.c
+++ b/test_main.c
@@ -740,6 +740,15 @@ static void test_error_messages(void)
"x = -I\"\n"
));
+ SHOULDFAIL { // should be silent
+ run(conf, S("--exists"), S("nonexistingpkg"), E);
+ }
+ EXPECT("");
+ SHOULDFAIL {
+ run(conf, S("--atleast-version"), S("9"), S("nonexistingpkg"), E);
+ }
+ EXPECT("");
+
SHOULDFAIL {
run(conf, S("--cflags"), S("nonexistingpkg"), E);
}
diff --git a/u-config.c b/u-config.c
index ea73990..7540f71 100644
--- a/u-config.c
+++ b/u-config.c
@@ -2004,11 +2004,11 @@ static void uconfig(config *conf)
}
if (err_to_stdout) {
- err = out;
+ proc->err = err = out;
}
if (silent) {
- err = newnullout(perm);
+ proc->err = err = newnullout(perm);
}
pkgspec *specs = parsespecs(args, nargs, 0, err, perm);
--
2.48.1