summaryrefslogtreecommitdiff
path: root/src/errors.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/errors.rs')
-rw-r--r--src/errors.rs15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/errors.rs b/src/errors.rs
index 3eb8605..6ea498d 100644
--- a/src/errors.rs
+++ b/src/errors.rs
@@ -32,11 +32,11 @@ pub enum BumperError {
#[error("Couldn't turn {0} into an absolute path: {1}")]
AbsPath(PathBuf, #[source] std::io::Error),
- #[error("Failed to run git: {0}")]
- GitInvoke(#[source] std::io::Error),
+ #[error("Failed to run git {1:?} in {0}: {2}")]
+ GitInvoke(PathBuf, Vec<String>, #[source] std::io::Error),
- #[error("Command 'git tag' failed: {0}")]
- GitTag(String),
+ #[error("git {1:?} failed in {0}: {2}")]
+ Git(PathBuf, Vec<String>, String),
#[error("Failed to run dch in {0}: {1}")]
DchInvoke(PathBuf, #[source] std::io::Error),
@@ -44,10 +44,3 @@ pub enum BumperError {
#[error("dch failed in {0}: {1}")]
Dch(PathBuf, String),
}
-
-impl BumperError {
- pub fn git_tag(stderr: &[u8]) -> Self {
- let stderr = String::from_utf8_lossy(stderr).into_owned();
- Self::GitTag(stderr)
- }
-}