From 64c27aae0221a22dc3fc048b0670574df4b1c350 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sat, 20 Jul 2024 01:43:53 +0200 Subject: [PATCH] Fix configuration target --- scripts/Common/Software/git/main.fish | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/Common/Software/git/main.fish b/scripts/Common/Software/git/main.fish index 657f3976..0d6845eb 100644 --- a/scripts/Common/Software/git/main.fish +++ b/scripts/Common/Software/git/main.fish @@ -10,17 +10,20 @@ begin function configureSW -S -V dir -a scope name source "$dir/../../Scripts/config.fish" set -l root + set -l user set -l configArgs function setConfig - sudo git config $configArgs $argv + sudo -u "$user" git config $configArgs $argv end if [ -z "$scope" ] || [ "$scope" = "system" ] set root "valhalla" + set user "root" set configArgs "--system" else set root "valhalla.users.$name" + set user "$name" set configArgs "--global" set -l displayName "$root.displayName" set -l mailAddress "$root.mailAddress"