diff options
author | Matthias Beyer <matthias.beyer@atos.net> | 2021-09-17 09:18:26 +0200 |
---|---|---|
committer | Matthias Beyer <matthias.beyer@atos.net> | 2021-09-17 09:18:26 +0200 |
commit | 905e4562272046d912f42f05973f48ca5ca02fd7 (patch) | |
tree | 624e0bf9a99bf8e7b59b9aeda33b8f3b96601cf7 | |
parent | 555734ea066d11d0b3efb96bff84563847f0757d (diff) |
Fix: Add more error context if release copy procedure fails
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
-rw-r--r-- | src/commands/release.rs | 4 |
1 files changed, 3 insertions, 1 deletions
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)) } |