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