Fix local host detection for remotes with user (#755)

This commit is contained in:
Andrew Barchuk
2024-04-08 13:43:32 +02:00
committed by GitHub
parent d90ce30452
commit 04bfb45a97
2 changed files with 60 additions and 9 deletions

View File

@@ -27,7 +27,7 @@ use self::error::Upgraded;
use self::steps::{remote::*, *};
use self::terminal::*;
use self::utils::{install_color_eyre, install_tracing, update_tracing};
use self::utils::{hostname, install_color_eyre, install_tracing, update_tracing};
mod breaking_changes;
mod command;
@@ -182,7 +182,7 @@ fn run() -> Result<()> {
}
if let Some(topgrades) = config.remote_topgrades() {
for remote_topgrade in topgrades.iter().filter(|t| config.should_execute_remote(t)) {
for remote_topgrade in topgrades.iter().filter(|t| config.should_execute_remote(hostname(), t)) {
runner.execute(Step::Remotes, format!("Remote ({remote_topgrade})"), || {
ssh::ssh_step(&ctx, remote_topgrade)
})?;