cac-get-server-by: no match -> return null
This commit is contained in:
parent
8ff3a49978
commit
d41e3a5577
@ -7,7 +7,9 @@ cac-listservers \
|
||||
--arg v "$2" \
|
||||
'
|
||||
map(select(.[$k]==$v)) |
|
||||
if (. | length) == 1 then
|
||||
if (. | length) == 0 then
|
||||
null
|
||||
elif (. | length) == 1 then
|
||||
.[0]
|
||||
else
|
||||
.
|
||||
|
Loading…
Reference in New Issue
Block a user