diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh index 2b2c1672..e8f6afe0 100755 --- a/hack/update-codegen.sh +++ b/hack/update-codegen.sh @@ -14,9 +14,10 @@ function codegen() { if [[ ${IN_DOCKER:-0} -eq 1 ]]; then # Already in a container ($CODEGEN_IMAGE). mkdir -p "$(dirname /go/src/$BASE_PKG/$PKG)" - ln -sf "$ROOT" "/go/src/$BASE_PKG/$PKG" + test -e "/go/src/$BASE_PKG/$PKG" || ln -s "$ROOT" "/go/src/$BASE_PKG/$PKG" cd "/go/src/$BASE_PKG/$PKG" - /codegen/entrypoint.sh "$@" 2>&1 | sed "s|^|$1 ($PKG) > |" + /codegen/entrypoint.sh "$@" 2>&1 \ + | sed "s|^|$1 ($PKG) > |" else # Local workstation. docker run \