diff --git a/crates/voidpin/src/main.rs b/crates/voidpin/src/main.rs index 544fe18..ddc4d84 100644 --- a/crates/voidpin/src/main.rs +++ b/crates/voidpin/src/main.rs @@ -123,6 +123,7 @@ async fn main() -> anyhow::Result<()> { } Commands::Paste {} => { let mut stdout = tokio::io::stdout(); + if let Ok(remote_host) = std::env::var("VOIDPIN_REMOTE") { let output = state.remote_copier(&remote_host).paste().await?; diff --git a/crates/voidpin/src/remote_copy.rs b/crates/voidpin/src/remote_copy.rs index d7fe2de..429ff32 100644 --- a/crates/voidpin/src/remote_copy.rs +++ b/crates/voidpin/src/remote_copy.rs @@ -58,8 +58,11 @@ impl RemoteCopier { tracing::info!("sending paste request"); let resp = client.paste(PasteRequest {}).await?; - tracing::info!("received paste response"); let output = resp.into_inner().content; + tracing::info!( + content = std::str::from_utf8(&output).unwrap_or_default(), + "received paste response" + ); Ok(output) }