From b06b829357a607a9567d75fbf3bded07d7002a53 Mon Sep 17 00:00:00 2001 From: f Date: Thu, 21 Sep 2023 13:10:26 -0300 Subject: [PATCH] fix: necesita un bloque --- db/migrate/20230921155401_site_rename_origin_to_upstream.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/db/migrate/20230921155401_site_rename_origin_to_upstream.rb b/db/migrate/20230921155401_site_rename_origin_to_upstream.rb index 4ad53f1b..864f4c4a 100644 --- a/db/migrate/20230921155401_site_rename_origin_to_upstream.rb +++ b/db/migrate/20230921155401_site_rename_origin_to_upstream.rb @@ -7,8 +7,9 @@ class SiteRenameOriginToUpstream < ActiveRecord::Migration[6.1] Site.find_each do |site| next unless site.repository.origin&.url == ENV['SKEL_SUTTY'] - site.repository.rugged.remotes.rename('origin', 'upstream') - Rails.logger.info "#{site.name}: renamed origin to upstream" + site.repository.rugged.remotes.rename('origin', 'upstream') do |_| + Rails.logger.info "#{site.name}: renamed origin to upstream" + end rescue Rugged::Error, Rugged::OSError => e Rails.logger.warn "#{site.name}: #{e.message}" end