Sfoglia il codice sorgente

reserve repository name "ALL"

Fabian Peter Hammerle 2 anni fa
parent
commit
0cffd40f9f
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. 4 0
      entrypoint.sh

+ 4 - 0
entrypoint.sh

@@ -28,6 +28,10 @@ unset SSH_CLIENT_PUBLIC_KEYS_APPEND_ONLY
 unset REPO_PATH
 while IFS=$'\n' read line; do
     repo_name="$(echo -E "$line" | cut -d = -f 1 | cut -d _ -f 3-)"
+    if [ "$repo_name" = "ALL" ]; then
+        echo 'Invalid repository name "ALL". Remove environment variable REPO_PATH_ALL.'
+        exit 1
+    fi
     repo_path="$(printenv "REPO_PATH_${repo_name}")"
     unset "REPO_PATH_${repo_name}"
     printenv "SSH_CLIENT_PUBLIC_KEYS_${repo_name}" | while IFS=$'\n' read -r key; do