summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorJustin Wernick <justin@worthe-it.co.za>2023-02-28 22:54:04 +0200
committerJustin Wernick <justin@worthe-it.co.za>2023-02-28 22:54:04 +0200
commitdb131014cf9d40f526a42d14901f3c10cba27786 (patch)
tree93eb9780269578641cf1ba93cfbe9f1abcd92ff4 /src/main.rs
parent54e3aa3422ae75fc9d69ceb9d09a8cd1a3e168ec (diff)
Git init
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 0df2754..142b4fc 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,6 +1,7 @@
use std::{io, io::Write};
use thiserror::Error;
+mod git;
mod parser;
use parser::Command;
@@ -31,6 +32,7 @@ fn main() -> Result<(), ShackleError> {
break;
}
Ok(Command::GitInit(repo_name)) => {
+ git::init(&repo_name)?; // TODO should report this error differently
println!("Successfully created {}.git", repo_name);
}
}
@@ -39,7 +41,9 @@ fn main() -> Result<(), ShackleError> {
}
#[derive(Error, Debug)]
-enum ShackleError {
+pub enum ShackleError {
#[error(transparent)]
IoError(#[from] io::Error),
+ #[error(transparent)]
+ GitError(#[from] git2::Error),
}