diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-05-07 12:13:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-07 12:13:16 +0200 |
commit | 14a3a62bfca6c572b9a415cfa80cdbd7ad4326b3 (patch) | |
tree | 4943404d2eb497bf0c4890527e5c841864c5a7ba /src/nix/search.cc | |
parent | 1ad71bc62c96321c3977297ddf88ad0595f40497 (diff) |
Update src/nix/search.cc
Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
Diffstat (limited to 'src/nix/search.cc')
-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 fca49350a..bbac56fcb 100644 --- a/src/nix/search.cc +++ b/src/nix/search.cc @@ -180,7 +180,7 @@ struct CmdSearch : InstallableCommand, MixJSON for (auto & [cursor, prefix] : installable->getCursor(*state, true)) visit(*cursor, parseAttrPath(*state, prefix)); - if (!results) + if (!json && !results) throw Error("no results for the given search term(s)!"); } }; |