Skip to content

Commit 4afab71

Browse files
committed
fix: support checks without "Running phase:" output (e.g. treefmt)
1 parent eb41260 commit 4afab71

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

transform.nu

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,13 @@ def main (file: string) {
3232
$status.attr | inspect
3333
let build_log = (do -i {
3434
script -efq -c $"nix log --log-format internal-json \".#checks.($system).($status.attr)\"" e+o>|
35-
| awk "/Running phase:/{p=1}p"
35+
| awk "/@nix/{p=1}p" # avoid any escape codes before the first @nix
36+
| lines
37+
| each {|row| $row | cut -c 6-}
38+
| each {|row| $row | from json}
39+
| where {|log| $log.action == "msg"}
40+
| last
41+
| $in.msg
3642
})
3743
rm ./typescript
3844
$status | update error $build_log

0 commit comments

Comments
 (0)