From 524601b9742ae85401805b4db61dd91c9bdf1b44 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 11 Aug 2016 21:01:51 +0200 Subject: logf: don't call jq's gsub with empty regex :) --- krebs/5pkgs/logf/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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("(?\(re))"; .it | f); + # Don't try empty regex: https://github.com/stedolan/jq/issues/1206 + when(re != ""; gsub("(?\(re))"; .it | f)); # :: [int] -> sgr def sgr: "\u001b[\(map(tostring) | join(";"))m"; -- cgit v1.2.3