diff options
Diffstat (limited to 'krebs')
-rw-r--r-- | krebs/5pkgs/simple/nixos-format-error.nix | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/krebs/5pkgs/simple/nixos-format-error.nix b/krebs/5pkgs/simple/nixos-format-error.nix index 9ba410bbe..a28f7245f 100644 --- a/krebs/5pkgs/simple/nixos-format-error.nix +++ b/krebs/5pkgs/simple/nixos-format-error.nix @@ -30,14 +30,14 @@ pkgs.writeGawkBin "nixos-format-error" '' } state == IDLE { - if ($0 == "building the system configuration...") { + if ($0 ~ /^building the system configuration\.\.\.
?$/) { state = ACTIVE } out() } state == ACTIVE { - if ($1 == "error:") { + if ($1 ~ /(\[[0-9;]+m)?error:(\[[0-9;]m)?/) { state = ERROR sub(/^/,"\x1b[31;1m"); sub(/$/,"\x1b[m") trace[trace_count++] = $0 @@ -57,6 +57,8 @@ pkgs.writeGawkBin "nixos-format-error" '' } state == ERROR { + sub(/
$/, "") + gsub(/\[[0-9;]*m/, "") if ($0 ~ /^\s*at /) { location = gensub(/^\s*at (.*):$/,"\\1","1") |