From 32d9799cb7a101c5f0919b3dbe628fbc7ce0f915 Mon Sep 17 00:00:00 2001 From: Yaroslav Bolyukin Date: Mon, 15 Jun 2026 13:23:26 +0000 Subject: [PATCH] fix: remote copy --- --- a/cmds/fleet/src/cmds/build_systems.rs +++ b/cmds/fleet/src/cmds/build_systems.rs @@ -1,4 +1,4 @@ -use std::{env::current_dir, os::unix::fs::symlink, path::PathBuf}; +use std::{env::current_dir, os::unix::fs::symlink}; use anyhow::Result; use camino::Utf8PathBuf; @@ -101,7 +101,7 @@ impl Deploy { pub async fn run(self, config: &Config, opts: &FleetOpts) -> Result<()> { let hosts = opts.filter_skipped(config.list_hosts()?)?; - let mut tasks = FuturesUnordered::new(); + let tasks = FuturesUnordered::new(); for host in hosts.into_iter() { let config = config.clone(); let span = info_span!("deploy", host = field::display(&host.name)); --- a/crates/fleet-base/src/host.rs +++ b/crates/fleet-base/src/host.rs @@ -24,7 +24,7 @@ use tempfile::NamedTempFile; use time::UtcDateTime; use tokio::task::spawn_blocking; -use tracing::{info, warn}; +use tracing::warn; use crate::fleetdata::{ FleetData, FleetSecretData, FleetSecretDistribution, FleetSecretPart, SecretOwner, @@ -282,7 +282,7 @@ /// Client for this host's unprivileged agent. pub async fn remowt(&self) -> Result { - Ok(self.connection().await?) + self.connection().await } pub fn ensure_nix_plugin(&self) -> Pin> + Send + '_>> { @@ -310,7 +310,7 @@ .rpc() .wait_for_connection_to(Address::Plugin(NIX_PLUGIN_ID)) .await - .map_err(|e| anyhow!("failed to wait for plugin"))?; + .map_err(|_| anyhow!("failed to wait for plugin"))?; anyhow::Ok(()) }) .await?; @@ -427,8 +427,8 @@ let store = self.nix_store().await?; { let path = path.clone(); - let store = eval_store(); - spawn_blocking(move || store.copy_to(&store, path.as_ref())) + let eval_store = eval_store(); + spawn_blocking(move || eval_store.copy_to(&store, path.as_ref())) .await .expect("copy_to panicked") .context("copying closure to remote store")?; -- gitstuff