From 8a340366bffa288eb735bdf4b125e7788e335018 Mon Sep 17 00:00:00 2001 From: Denis Lehmann Date: Sun, 22 Oct 2023 12:33:21 +0200 Subject: [PATCH] replace readarray with read --- gis | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gis b/gis index 3164e81..a55059b 100755 --- a/gis +++ b/gis @@ -89,7 +89,9 @@ fi # Find Git repositories git_dirs=() for path in "${paths[@]}"; do - readarray -t found_git_dirs < <(find "$path" -type d -name ".git" -exec dirname {} \; | sort) + OLDIFS=$IFS + IFS=$'\n' read -r -d '' -a found_git_dirs < <(find "$path" -type d -name ".git" -exec dirname {} \; | sort) + IFS=$OLDIFS # Check if inside of a repository if none found if [ "${#found_git_dirs[@]}" -eq 0 ]; then