nix search: Don't quietly ignore errors

(cherry picked from commit 7c74f075f4a7274ad38c90085cc269a19a977438)
This commit is contained in:
Eelco Dolstra 2019-10-09 14:46:58 +02:00
parent 1d5cb6ad48
commit 1b78bbb414
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -265,6 +265,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)