summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/logf/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'krebs/5pkgs/logf/default.nix')
-rw-r--r--krebs/5pkgs/logf/default.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/krebs/5pkgs/logf/default.nix b/krebs/5pkgs/logf/default.nix
index d9eae0a4a..ac95acb33 100644
--- a/krebs/5pkgs/logf/default.nix
+++ b/krebs/5pkgs/logf/default.nix
@@ -54,7 +54,8 @@ pkgs.writeDashBin "logf" ''
# anaphoric gsub
def agsub(re; f):
- gsub("(?<it>\(re))"; .it | f);
+ # Don't try empty regex: https://github.com/stedolan/jq/issues/1206
+ when(re != ""; gsub("(?<it>\(re))"; .it | f));
# :: [int] -> sgr
def sgr: "\u001b[\(map(tostring) | join(";"))m";