Skip to content

Commit

Permalink
minor fix 2
Browse files Browse the repository at this point in the history
  • Loading branch information
gvoze32 committed Jun 12, 2024
1 parent 993b471 commit 5184e49
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,10 @@ jobs:
run: |
remove_adjacent_empty_lines() {
local file_path="$1"
local temp_file=$(mktemp)
awk 'NF || !p {print} {p = !NF}' "$file_path" > "$temp_file"
mv "$temp_file" "$file_path"
awk 'BEGIN { prev_blank=0 } { if ($0 ~ /^$/) { if (prev_blank == 0) print; prev_blank=1 } else { print; prev_blank=0 } }' "$file_path" > temp && mv temp "$file_path"
}
file_path='releases/hosts'
file_path='hosts'
remove_adjacent_empty_lines "$file_path"
- name: Commit changes
env:
Expand Down

0 comments on commit 5184e49

Please sign in to comment.