aboutsummaryrefslogtreecommitdiff
path: root/src/nix
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-10-10 12:54:37 +0200
committerEelco Dolstra <edolstra@gmail.com>2019-10-10 12:54:37 +0200
commite99bb9121787ae30a1872f63b326ce5c130ec7ef (patch)
treeecdd2b7ba575b0848d2770f8e74b40646f512c71 /src/nix
parentd343c03edb8d4d2be7aca4f1a377544b3889b8b3 (diff)
parentc3aaf3b8da1a925c569389f13a861816a781a3c8 (diff)
Merge remote-tracking branch 'origin/master' into flakes
Diffstat (limited to 'src/nix')
-rw-r--r--src/nix/progress-bar.cc2
-rw-r--r--src/nix/search.cc5
-rw-r--r--src/nix/verify.cc3
3 files changed, 3 insertions, 7 deletions
diff --git a/src/nix/progress-bar.cc b/src/nix/progress-bar.cc
index c0bcfb0c9..5c05d6b22 100644
--- a/src/nix/progress-bar.cc
+++ b/src/nix/progress-bar.cc
@@ -120,7 +120,7 @@ public:
void log(State & state, Verbosity lvl, const std::string & s)
{
if (state.active) {
- writeToStderr("\r\e[K" + s + ANSI_NORMAL "\n");
+ writeToStderr("\r\e[K" + filterANSIEscapes(s, !isTTY) + ANSI_NORMAL "\n");
draw(state);
} else {
auto s2 = s + ANSI_NORMAL "\n";
diff --git a/src/nix/search.cc b/src/nix/search.cc
index 70de717d1..caea25cdc 100644
--- a/src/nix/search.cc
+++ b/src/nix/search.cc
@@ -75,10 +75,6 @@ struct CmdSearch : SourceExprCommand, MixJSON
Example{
"To search for git and frontend or gui:",
"nix search git 'frontend|gui'"
- },
- Example{
- "To display the description of the found packages:",
- "nix search git --verbose"
}
};
}
@@ -262,6 +258,7 @@ struct CmdSearch : SourceExprCommand, MixJSON
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66145 */
if (!jsonCacheFile)
throw Error("error writing to %s", tmpFile);
+ throw;
}
if (writeCache && rename(tmpFile.c_str(), jsonCacheFileName.c_str()) == -1)
diff --git a/src/nix/verify.cc b/src/nix/verify.cc
index f55766eda..81abf434f 100644
--- a/src/nix/verify.cc
+++ b/src/nix/verify.cc
@@ -113,8 +113,7 @@ struct CmdVerify : StorePathsCommand
auto doSigs = [&](StringSet sigs) {
for (auto sig : sigs) {
- if (sigsSeen.count(sig)) continue;
- sigsSeen.insert(sig);
+ if (!sigsSeen.insert(sig).second) continue;
if (validSigs < ValidPathInfo::maxSigs && info->checkSignature(publicKeys, sig))
validSigs++;
}