From 9aab08768aac6ad6e43a25859019fa657a7aab52 Mon Sep 17 00:00:00 2001 From: Ole Langbehn <ole.langbehn@inoio.de> Date: Thu, 7 Nov 2024 15:44:01 +0100 Subject: [PATCH] chore: improve the forall-git script a bit --- helpers/forall-git | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/helpers/forall-git b/helpers/forall-git index 611d53e..8ef165b 100755 --- a/helpers/forall-git +++ b/helpers/forall-git @@ -15,10 +15,10 @@ else find -L . -maxdepth 3 -name .git -type d|while read gitdir; do projectdir=$(dirname $gitdir) - pushd $projectdir > /dev/null - WD=$(basename $(pwd)) + pushd "$projectdir" > /dev/null || exit + WD=$(basename "$(pwd)") echo -e "${COLOR}${WD}${NC}" "$@" - popd > /dev/null + popd > /dev/null || exit done fi -- GitLab