From de2e91af3b5fcb6c3bc3c251c396cf68a0385a6e Mon Sep 17 00:00:00 2001 From: Cody Cutrer Date: Thu, 5 Oct 2023 10:51:16 -0600 Subject: [PATCH] only re-sync twice, not thrice off-by-one --- lib/bundler/multilock.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/bundler/multilock.rb b/lib/bundler/multilock.rb index b20007e..a003f40 100644 --- a/lib/bundler/multilock.rb +++ b/lib/bundler/multilock.rb @@ -273,8 +273,9 @@ def after_install_all(install: true) # once to reset them back to the default lockfile's version. # if it's already good, the `check` check at the beginning of # the loop will skip the second sync anyway. - if had_changes && attempts < 3 + if had_changes && attempts < 2 attempts += 1 + Bundler.ui.debug("Re-running sync to #{relative_lockfile} to reset common dependencies") redo else attempts = 1