From 1eedc5ad2c1f344182d425ed8ec04c4664b1db12 Mon Sep 17 00:00:00 2001 From: Jools Wills Date: Fri, 13 May 2022 16:17:40 +0100 Subject: [PATCH] packages - fix update check due to security warning with git 2.34.1 As with e041a0c5 we need to use the same user for running git as the owner of the repository files. This is also needed for an update check in rp_hasNewerModule as we check the last commit date of scriptmodules in RetroPie-Setup. --- scriptmodules/packages.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scriptmodules/packages.sh b/scriptmodules/packages.sh index d94ba0db8e..9aa54ff192 100644 --- a/scriptmodules/packages.sh +++ b/scriptmodules/packages.sh @@ -643,7 +643,7 @@ function rp_hasNewerModule() { local vendor="${__mod_info[$id/vendor]}" local repo_dir="$scriptdir" [[ "$vendor" != "RetroPie" ]] && repo_dir+="/ext/$vendor" - local module_date="$(git -C "$repo_dir" log -1 --format=%cI -- "${__mod_info[$id/path]}")" + local module_date="$(sudo -u "$user" git -C "$repo_dir" log -1 --format=%cI -- "${__mod_info[$id/path]}")" if rp_dateIsNewer "$pkg_date" "$module_date"; then ret=0 fi