diff options
| author | Don Williams <don.e.williams@gmail.com> | 2026-01-22 19:23:58 -0500 |
|---|---|---|
| committer | Don Williams <don.e.williams@gmail.com> | 2026-01-22 19:26:20 -0500 |
| commit | 2088bdc2b5ef8c2823e6f2e4997871818417672e (patch) | |
| tree | 209e192f4c1c4b088f80b3a3558e4bff39d649ed | |
| parent | c6a85140d2578a7d3ea009cb8074049c98c8da4e (diff) | |
fix: UserConfigs dedupe handling for express/update
| -rwxr-xr-x | copy.sh | 13 | ||||
| -rw-r--r-- | scripts/lib_copy.sh | 11 |
2 files changed, 17 insertions, 7 deletions
@@ -410,7 +410,12 @@ if command -v ags >/dev/null 2>&1; then fi fi -printf "\n%.0s" {1..1} +printf "\\n%.0s" {1..1} + +# Capture installed dotfiles version at the start of the workflow so we +# can apply cleanup rules based on the pre-upgrade state, even if a newer +# version marker is copied in later. +INSTALLED_VERSION_AT_START="$(get_installed_dotfiles_version || true)" # quickshell (ags alternative) # Check if quickshell is installed @@ -478,10 +483,10 @@ fi printf "\n%.0s" {1..1} restore_hypr_assets "$LOG" "$EXPRESS_MODE" -printf "\n%.0s" {1..1} +printf "\\n%.0s" {1..1} -restore_user_configs "$LOG" "$EXPRESS_MODE" "$INSTALLED_VERSION" -printf "\n%.0s" {1..1} +restore_user_configs "$LOG" "$EXPRESS_MODE" "$INSTALLED_VERSION_AT_START" +printf "\\n%.0s" {1..1} restore_user_scripts "$LOG" "$EXPRESS_MODE" printf "\n%.0s" {1..1} diff --git a/scripts/lib_copy.sh b/scripts/lib_copy.sh index ace6f4d7..331c6906 100644 --- a/scripts/lib_copy.sh +++ b/scripts/lib_copy.sh @@ -427,9 +427,14 @@ restore_user_configs() { fi # Always run de-dupe based on the installed dotfiles version so that - # express mode and standard mode behave consistently. - local detected_version - detected_version=$(get_installed_dotfiles_version) + # express mode and standard mode behave consistently. Prefer the + # pre-upgrade version (old_version) if provided so we still clean up + # legacy duplicates when upgrading to a newer release that no longer + # needs the fix. + local detected_version="$old_version" + if [ -z "$detected_version" ]; then + detected_version=$(get_installed_dotfiles_version) + fi if [ -n "$detected_version" ]; then cleanup_duplicate_userconfigs "$detected_version" "$log" fi |
