Skip to content

Commit bc94ee1

Browse files
authored
Merge pull request #3640 from cmitu/update-package
packages: amend update detection for untracked modules
2 parents cbe16bf + 191485a commit bc94ee1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

scriptmodules/packages.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,8 @@ function rp_hasNewerModule() {
644644
local repo_dir="$scriptdir"
645645
[[ "$vendor" != "RetroPie" ]] && repo_dir+="/ext/$vendor"
646646
local module_date="$(sudo -u "$user" git -C "$repo_dir" log -1 --format=%cI -- "${__mod_info[$id/path]}")"
647+
# just in case the module is not known to git, get the file last modified date
648+
[[ -z "$module_date" ]] && module_date="$(date -Iseconds -r "${__mod_info[$id/path]}")"
647649
if rp_dateIsNewer "$pkg_date" "$module_date"; then
648650
ret=0
649651
fi

0 commit comments

Comments
 (0)