feat: added nix flake #5

Merged
cafkafk merged 8 commits from dev into main 2023-06-18 20:02:36 +02:00
2 changed files with 6 additions and 7 deletions
Showing only changes of commit 5e974e213d - Show all commits

View file

@ -99,7 +99,7 @@ impl GitRepo {
.arg(&self.url) .arg(&self.url)
.arg(&self.name) .arg(&self.name)
.status() .status()
.unwrap_or_else(|_| panic!("git repo failed to add: {:?}", &self,)); .unwrap_or_else(|_| panic!("git repo failed to clone: {:?}", &self,));
info!("{out}"); info!("{out}");
} else { } else {
info!("{} has clone set to false, not cloned", &self.name); info!("{} has clone set to false, not cloned", &self.name);
@ -121,7 +121,7 @@ impl GitRepo {
.arg("add") .arg("add")
.arg(".") .arg(".")
.status() .status()
.expect("failed to add"); .unwrap_or_else(|_| panic!("git repo failed to add: {:?}", &self,));
info!("{out}"); info!("{out}");
} }
/// Tries to commit changes in the repository. /// Tries to commit changes in the repository.
@ -131,7 +131,7 @@ impl GitRepo {
.current_dir(format!("{}{}", &self.path, &self.name)) .current_dir(format!("{}{}", &self.path, &self.name))
.arg("commit") .arg("commit")
.status() .status()
.expect("failed to commit"); .unwrap_or_else(|_| panic!("git repo failed to commit: {:?}", &self,));
info!("{out}"); info!("{out}");
} }
/// Tries to commit changes with a message argument. /// Tries to commit changes with a message argument.
@ -142,7 +142,7 @@ impl GitRepo {
.arg("-m") .arg("-m")
.arg(msg) .arg(msg)
.status() .status()
.expect("failed to commit"); .unwrap_or_else(|_| panic!("git repo failed to commit: {:?}", &self,));
info!("{out}"); info!("{out}");
} }
/// Attempts to push the repository. /// Attempts to push the repository.
@ -151,7 +151,7 @@ impl GitRepo {
.current_dir(format!("{}{}", &self.path, &self.name)) .current_dir(format!("{}{}", &self.path, &self.name))
.arg("push") .arg("push")
.status() .status()
.expect("failed to push"); .unwrap_or_else(|_| panic!("git repo failed to push: {:?}", &self,));
info!("{out}"); info!("{out}");
} }
/// Removes repository /// Removes repository

View file

@ -76,7 +76,6 @@ mod config {
use std::env::current_dir; use std::env::current_dir;
use std::fs::File; use std::fs::File;
use std::io::prelude::*; use std::io::prelude::*;
//use utils::dir::current_dir;
#[test] #[test]
fn init_config() { fn init_config() {
let _config = Config { let _config = Config {
@ -178,7 +177,7 @@ mod config {
} }
} }
/* Unable to test with networking inside flake /* FIXME Unable to test with networking inside flake
#[cfg(test)] #[cfg(test)]
mod repo_actions { mod repo_actions {
use crate::*; use crate::*;