Skip to content

Commit

Permalink
Filter out control characters from closure diffs (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
matrss authored Mar 16, 2024
1 parent 27efa90 commit 5cde072
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/pr-closure-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,12 @@ jobs:
comm -12 systems-before systems-after |
while read -r system; do
printf '<details>\n<summary>%s</summary>\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</details>\n\n' >> message-body
done
- name: Set finished message
Expand Down

0 comments on commit 5cde072

Please sign in to comment.