diff options
author | Domen Kožar <domen@dev.si> | 2020-05-06 16:14:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-06 16:14:58 +0200 |
commit | 672985531c6b9481f8eb8210a17328dfc2515c9b (patch) | |
tree | 59853b059b49831f9d4b9a7d9f961cb0279145d8 /src | |
parent | 74a1bfdcab03d3c6ecb9353f4bae0a0c550ddb98 (diff) | |
parent | 85c1932c9425c15d8d16da4777ed27667874a744 (diff) |
Merge pull request #3570 from Mic92/nix-search
nix/search: no error for empty search results if json is enabled
Diffstat (limited to 'src')
-rw-r--r-- | src/nix/search.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix/search.cc b/src/nix/search.cc index fcad6be84..ba72c1e79 100644 --- a/src/nix/search.cc +++ b/src/nix/search.cc @@ -265,7 +265,7 @@ struct CmdSearch : SourceExprCommand, MixJSON throw SysError("cannot rename '%s' to '%s'", tmpFile, jsonCacheFileName); } - if (results.size() == 0) + if (!json && results.size() == 0) throw Error("no results for the given search term(s)!"); RunPager pager; |