Parsing ls is an anti-pattern, but the author says it works for years - we all do mistakes and as long as it works you don't notice.
And it's an easy fix:
- for project in $(ls go-cicd); do
+ cd go-cicd || exit 1; for project in \*; do