Skip to content
Snippets Groups Projects
Unverified Commit 19d65193 authored by Bob Callaway's avatar Bob Callaway Committed by GitHub
Browse files

return exit code of 1 if no results found (#386)

parent 27be9e73
No related branches found
No related tags found
No related merge requests found
......@@ -196,6 +196,10 @@ var searchCmd = &cobra.Command{
}
}
if len(resp.Payload) == 0 {
return nil, fmt.Errorf("no matching entries found")
}
return &searchCmdOutput{
uuids: resp.GetPayload(),
}, nil
......
......@@ -226,6 +226,10 @@ func TestGet(t *testing.T) {
outputContains(t, out, uuid)
}
func TestSearchNoEntriesRC1(t *testing.T) {
runCliErr(t, "search", "--email", "noone@internetz.com")
}
func TestMinisign(t *testing.T) {
// Create a keypair
keyPath := filepath.Join(t.TempDir(), "minisign.key")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment