Skip to content

Commit 9b6cc58

Browse files
author
Matthew Fisher
committed
fix(builder): call ls rather than using a wildcard
The wildcard caused an off-by-one error where if no git repositories existed, the wildcard was then interpreted, causing all images prefixed with the registry IP address to be removed inside builder. As an example: $ for repo in *.git; do echo $repo; done *.git $ for repo in $(ls | grep .git); do echo $repo; done $ mkdir foo.git $ for repo in *.git; do echo $repo; done foo.git $ for repo in $(ls | grep .git); do echo $repo; done foo.git
1 parent 1c9d34c commit 9b6cc58

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

builder/rootfs/etc/confd/templates/check-repos

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export ETCD=${ETCD:-$HOST:4001}
44

55
cd $(dirname $0) # absolute path
66

7-
for repo in *.git
7+
for repo in $(ls | grep .git)
88
do
99
reponame="${repo%.*}"
1010
if ! etcdctl -C $ETCD ls /deis/services/"$reponame" > /dev/null 2>&1

0 commit comments

Comments
 (0)