From 158f8aa510d7fea2f77cbb31e153f9c7caf9acb1 Mon Sep 17 00:00:00 2001 From: Maggie Lou Date: Mon, 10 Jun 2024 15:48:54 -0500 Subject: [PATCH] Fix prettier for zsh --- tools/prettier/prettier.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/prettier/prettier.sh b/tools/prettier/prettier.sh index 001ae40b6e9..4091e732e7f 100755 --- a/tools/prettier/prettier.sh +++ b/tools/prettier/prettier.sh @@ -39,7 +39,10 @@ function paths_to_format() { git diff --name-only --diff-filter=AMRCT "$DIFF_BASE" -- "${GIT_FILE_PATTERNS[@]}" } -mapfile -t paths < <(paths_to_format) +paths=() +while read -r path; do + paths+=("$path") +done < <(paths_to_format) if [[ -z "${paths[*]}" ]]; then exit 0