fix empty paths

This commit is contained in:
Denis Lehmann 2023-09-19 15:11:40 +02:00
parent c15b0eda2e
commit 507f9426a4

6
gis
View file

@ -45,12 +45,14 @@ while (( "$#" )); do
done done
# Add $GIS_PATH or current work directory to paths if none is given # Add $GIS_PATH or current work directory to paths if none is given
if [ "$GIS_PATH" ]; then if [ "${paths[*]}" == "" ]; then
if [ "$GIS_PATH" ]; then
OLDIFS=$IFS OLDIFS=$IFS
IFS=":" read -r -a paths <<< "$GIS_PATH" IFS=":" read -r -a paths <<< "$GIS_PATH"
IFS=$OLDIFS IFS=$OLDIFS
elif [ "${paths[*]}" == "" ]; then else
paths=("$(pwd)") paths=("$(pwd)")
fi
fi fi
# Find Git repositories # Find Git repositories