aboutsummaryrefslogtreecommitdiff
path: root/src/nix
diff options
context:
space:
mode:
authorCarlo Nucera <carlo.nucera@protonmail.com>2020-07-06 16:57:09 -0400
committerCarlo Nucera <carlo.nucera@protonmail.com>2020-07-06 16:57:09 -0400
commit0f05a36e205a1d04a0ed6d6cdcd0e3e225f73f05 (patch)
treef70e5c83a7f28a4e0a8ec633020f6112968d02ce /src/nix
parentd4250fef239b28b4a098e70e1deac889616dbb9a (diff)
parentc385535c18ec2bd73b60e19bcfeb3c07487010fd (diff)
Merge branch 'master' of github.com:NixOS/nix into better-ca-parse-errors
Diffstat (limited to 'src/nix')
-rw-r--r--src/nix/repl.cc6
-rw-r--r--src/nix/search.cc2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/nix/repl.cc b/src/nix/repl.cc
index 617d49614..fdacf604b 100644
--- a/src/nix/repl.cc
+++ b/src/nix/repl.cc
@@ -211,12 +211,12 @@ void NixRepl::mainLoop(const std::vector<std::string> & files)
// input without clearing the input so far.
continue;
} else {
- printMsg(lvlError, error + "%1%%2%", (settings.showTrace ? e.prefix() : ""), e.msg());
+ printMsg(lvlError, e.msg());
}
} catch (Error & e) {
- printMsg(lvlError, error + "%1%%2%", (settings.showTrace ? e.prefix() : ""), e.msg());
+ printMsg(lvlError, e.msg());
} catch (Interrupted & e) {
- printMsg(lvlError, error + "%1%%2%", (settings.showTrace ? e.prefix() : ""), e.msg());
+ printMsg(lvlError, e.msg());
}
// We handled the current input fully, so we should clear it
diff --git a/src/nix/search.cc b/src/nix/search.cc
index ba72c1e79..93c3f3f83 100644
--- a/src/nix/search.cc
+++ b/src/nix/search.cc
@@ -216,7 +216,7 @@ struct CmdSearch : SourceExprCommand, MixJSON
} catch (AssertionError & e) {
} catch (Error & e) {
if (!toplevel) {
- e.addPrefix(fmt("While evaluating the attribute '%s':\n", attrPath));
+ e.addTrace(std::nullopt, "While evaluating the attribute '%s'", attrPath);
throw;
}
}