forked from clan/clan-core
zerotier-static-peers: add guard condition
This commit is contained in:
parent
87444cd2b8
commit
503ce29c84
@ -20,7 +20,7 @@ let
|
|||||||
if builtins.pathExists fullPath then builtins.readFile fullPath else null
|
if builtins.pathExists fullPath then builtins.readFile fullPath else null
|
||||||
) machines;
|
) machines;
|
||||||
networkIds = lib.filter (machine: machine != null) networkIdsUnchecked;
|
networkIds = lib.filter (machine: machine != null) networkIdsUnchecked;
|
||||||
networkId = builtins.elemAt networkIds 0;
|
networkId = if builtins.length networkIds == 0 then null else builtins.elemAt networkIds 0;
|
||||||
in
|
in
|
||||||
#TODO:trace on multiple found network-ids
|
#TODO:trace on multiple found network-ids
|
||||||
#TODO:trace on no single found networkId
|
#TODO:trace on no single found networkId
|
||||||
|
Loading…
Reference in New Issue
Block a user