From 8ba7a2d3a8283babea324d3f822c9e5b75a174b4 Mon Sep 17 00:00:00 2001 From: Farid Zakaria Date: Mon, 24 Jan 2022 19:12:13 -0800 Subject: [PATCH] Do not suppress errors in nix-env from feedback by Eelco --- src/nix-env/nix-env.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nix-env/nix-env.cc b/src/nix-env/nix-env.cc index f95754599..d2636abf7 100644 --- a/src/nix-env/nix-env.cc +++ b/src/nix-env/nix-env.cc @@ -948,7 +948,8 @@ static void queryJSON(Globals & globals, vector & elems, bool printOutP } catch (AssertionError & e) { printMsg(lvlTalkative, "skipping derivation named '%1%' which gives an assertion failure", i.queryName()); } catch (Error & e) { - printMsg(lvlError, "skipping derivation named '%1%' which gives an error '%2%'", i.queryName(), e.msg()); + e.addTrace(std::nullopt, "while querying the derivation named '%1%'", i.queryName()); + throw; } } }