Merge pull request #3570 from Mic92/nix-search
nix/search: no error for empty search results if json is enabled
This commit is contained in:
commit
672985531c
1 changed files with 1 additions and 1 deletions
|
@ -265,7 +265,7 @@ struct CmdSearch : SourceExprCommand, MixJSON
|
||||||
throw SysError("cannot rename '%s' to '%s'", tmpFile, jsonCacheFileName);
|
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)!");
|
throw Error("no results for the given search term(s)!");
|
||||||
|
|
||||||
RunPager pager;
|
RunPager pager;
|
||||||
|
|
Loading…
Reference in a new issue