From 905e4562272046d912f42f05973f48ca5ca02fd7 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Fri, 17 Sep 2021 09:18:26 +0200 Subject: Fix: Add more error context if release copy procedure fails Signed-off-by: Matthias Beyer --- src/commands/release.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/commands/release.rs b/src/commands/release.rs index 6f0232b..460fbeb 100644 --- a/src/commands/release.rs +++ b/src/commands/release.rs @@ -14,6 +14,7 @@ use std::io::Write; use std::path::PathBuf; use anyhow::anyhow; +use anyhow::Context; use anyhow::Error; use anyhow::Result; use clap::ArgMatches; @@ -166,8 +167,9 @@ async fn new_release( } // else !dest_path.exists() - tokio::fs::copy(art_path, &dest_path) + tokio::fs::copy(&art_path, &dest_path) .await + .with_context(|| anyhow!("Copying {} to {}", art_path.display(), dest_path.display())) .map_err(Error::from) .map(|_| (art, dest_path)) } -- cgit v1.2.3