Skip to content
Prev Previous commit
Next Next commit
Use readarray for more reliable mechanism of reading output of sed in…
…to an array
  • Loading branch information
cmcgee1024 committed May 14, 2025
commit 0f91dd03868187634110fe22a523f2c53f5c3c2c
2 changes: 1 addition & 1 deletion .github/workflows/scripts/check-license-header.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ dynamic_exclude_list=( )

if [[ -f .licenseignore ]]; then
static_exclude_list+=( '":(exclude).licenseignore"' )
IFS=$'\n' read -r -a dynamic_exclude_list <<< "$(sed -E 's/^(.*)$/":(exclude)\1"/' <.licenseignore)"
readarray -t dynamic_exclude_list <<< "$(sed -E 's/^(.*)$/":(exclude)\1"/' <.licenseignore)"
fi

exclude_list=( "${static_exclude_list[@]}" "${dynamic_exclude_list[@]}" )
Expand Down