Add forward slash cleanup of the app name for the git-upload-pack
command. Prevents is_valid_app_name from removing the application folder
on `git fetch`.
This commit is contained in:
Vincent Tavernier
2017-10-02 09:26:13 +02:00
parent 5b3506584a
commit c9af7e4cfa

View File

@@ -153,7 +153,7 @@ git_build() {
git_upload_pack_cmd() {
declare desc="executes git-upload-pack"
local cmd="git-upload-pack"
local APP="$(echo "$2" | perl -pe 's/(?<!\\)'\''//g' | sed 's/\\'\''/'\''/g')"
local APP="$(echo "$2" | perl -pe 's/(?<!\\)'\''//g' | sed 's/\\'\''/'\''/g' | sed 's/^\///g')"
is_valid_app_name "$APP"
plugn trigger git-pre-pull "$APP"
cat | git-upload-pack "$DOKKU_ROOT/$APP"