From 5cde072c728afc729e2c59131e6fb1aebb43869b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Ri=C3=9Fe?= <9308656+matrss@users.noreply.github.com> Date: Sat, 16 Mar 2024 20:23:47 +0100 Subject: [PATCH] Filter out control characters from closure diffs (#44) --- .github/workflows/pr-closure-diff.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-closure-diff.yml b/.github/workflows/pr-closure-diff.yml index e0e9f60..fe38586 100644 --- a/.github/workflows/pr-closure-diff.yml +++ b/.github/workflows/pr-closure-diff.yml @@ -70,9 +70,12 @@ jobs: comm -12 systems-before systems-after | while read -r system; do printf '
\n%s\n\n```\n' "$system" >> message-body + # The sed call filters out the control characters that diff-closures emits. + # See: https://github.com/NixOS/nix/issues/4626 nix store diff-closures --derivation \ "./before#nixosConfigurations.\"$system\".config.system.build.toplevel" \ - "./after#nixosConfigurations.\"$system\".config.system.build.toplevel" >> message-body + "./after#nixosConfigurations.\"$system\".config.system.build.toplevel" | + sed 's/\x1b\[[0-9;]*m//g' >> message-body printf '```\n
\n\n' >> message-body done - name: Set finished message