summaryrefslogtreecommitdiff
path: root/src/errors.rs
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-04-04 15:05:00 +0300
committerLars Wirzenius <liw@liw.fi>2021-04-04 15:49:23 +0300
commite1d3132ace342716c20f32737a514abaa0132550 (patch)
tree37156ee9184507d419a65572ee1c59d2666d0c6a /src/errors.rs
parentaa8675d968aa070a976557e1bc54919a2ac9cde4 (diff)
downloadbumper-rs-e1d3132ace342716c20f32737a514abaa0132550.tar.gz
feat: commit changes made by Bumper
The git tag then points at that commit.
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)
- }
-}