From b5334a0859dd8923b9ee4d3cc90a11e39d6ac431 Mon Sep 17 00:00:00 2001 From: Astro Date: Mon, 12 Sep 2022 19:36:03 +0200 Subject: [PATCH] lib/openwrt-models: work around empty lines --- nix/lib/openwrt-models.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/nix/lib/openwrt-models.nix b/nix/lib/openwrt-models.nix index 1ee7b49..7b08cb7 100644 --- a/nix/lib/openwrt-models.nix +++ b/nix/lib/openwrt-models.nix @@ -28,8 +28,14 @@ let builtins.filter (word: word != [] && word != "" ) tokens; - command = builtins.head words; - args = builtins.tail words; + command = + if words != [] + then builtins.head words + else "-"; + args = + if words != [] + then builtins.tail words + else []; makeLinkFromArg = port: arg: builtins.foldl' (result: interface: