Skip to content

Commit 5a7c33d

Browse files
author
Pierre Ayoub
committed
fix(git-bulk): use readarray for find command
1. Use `readarray` such that we can handle paths with spaces 2. Remove the unnecessary `eval`
1 parent 48f0892 commit 5a7c33d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/git-bulk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ function executBulkOp () {
155155
find_flags+=(-L)
156156
fi
157157
# find all git repositories under the workspace on which we want to operate
158-
allGitFolders=( $(eval find $find_flags . -name ".git") )
158+
readarray allGitFolders < <(find "${find_flags[@]}" . -name ".git")
159159

160160
for line in "${allGitFolders[@]}"; do
161161
local gitrepodir=${line::${#line}-5} # cut the .git part of find results to have the root git directory of that repository

0 commit comments

Comments
 (0)