From f701015dcce565ab9323a4057b3577f61999601f Mon Sep 17 00:00:00 2001 From: Matthias Lucas Jaros Date: Mon, 20 Oct 2025 10:23:46 +0200 Subject: Renamed variables again to avoid collision with global docker environment variables --- src/run | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/run') diff --git a/src/run b/src/run index a1ae7d5..10d69c8 100755 --- a/src/run +++ b/src/run @@ -1,11 +1,11 @@ #!/usr/bin/env fish -set REPO_PERMISSIONS_FILE /etc/repo-permissions +set _REPO_PERMISSIONS_FILE /etc/repo-permissions # unify repo regex somehow -set GIT_VALIDATION_REGEX "^(git-(?:upload-pack|receive-pack|upload-archive)) '((?:\/[a-zA-Z-]+)+.git)'\$" +set _GIT_VALIDATION_REGEX "^(git-(?:upload-pack|receive-pack|upload-archive)) '((?:\/[a-zA-Z-]+)+.git)'\$" # check given git command -set -l matcher (string match -r -g $GIT_VALIDATION_REGEX "$argv") +set -l matcher (string match -r -g $_GIT_VALIDATION_REGEX "$argv") if test (count $matcher) -ne 2 # there should be two groups otherwise something is wrong exit 1 @@ -18,7 +18,7 @@ set -l repo $matcher[2] # adjust repo path to /srv/repos set -l repoDir srv repos set -l repoDir /(string join -n '/' $repoDir (string split '/' $repo)) -cat $REPO_PERMISSIONS_FILE | grep -q -E "^$repoDir:$checkUser\$" +cat $_REPO_PERMISSIONS_FILE | grep -q -E "^$repoDir:$checkUser\$" or exit 1; # execute parsed git command -- cgit v1.3.1