diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b725cc..76696ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [0.9.1] - 2024-06-24 + +### Fixed + +- Fix bug where `--quiet` flag was ignored during a `git pull` + ## [0.9.0] - 2024-06-23 ### Added diff --git a/Cargo.lock b/Cargo.lock index e1e3547..e8e878c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -387,7 +387,7 @@ dependencies = [ [[package]] name = "tinted-builder-rust" -version = "0.9.0" +version = "0.9.1" dependencies = [ "anyhow", "clap", diff --git a/tinted-builder-rust/Cargo.toml b/tinted-builder-rust/Cargo.toml index 8f4f891..2c6fdc8 100644 --- a/tinted-builder-rust/Cargo.toml +++ b/tinted-builder-rust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tinted-builder-rust" -version = "0.9.0" +version = "0.9.1" edition = "2021" authors = ["Jamy Golden ", "Tinted Theming "] license = "MIT OR Apache-2.0" diff --git a/tinted-builder-rust/src/operations/sync.rs b/tinted-builder-rust/src/operations/sync.rs index 855de9e..5c8195a 100644 --- a/tinted-builder-rust/src/operations/sync.rs +++ b/tinted-builder-rust/src/operations/sync.rs @@ -30,7 +30,7 @@ fn git_clone(repo_url: &str, target_dir: &Path, is_quiet: bool) -> Result<()> { Ok(()) } -fn git_pull(repo_path: &Path) -> Result<()> { +fn git_pull(repo_path: &Path, is_quiet: bool) -> Result<()> { if !repo_path.is_dir() { return Err(anyhow!( "Error with git pull. {} is not a directory", @@ -38,10 +38,15 @@ fn git_pull(repo_path: &Path) -> Result<()> { )); } - let status = Command::new("git") - .arg("pull") - .current_dir(repo_path) - .stdout(Stdio::null()) + let mut cmd = Command::new("git"); + + cmd.arg("pull").current_dir(repo_path); + + if is_quiet { + cmd.stdout(Stdio::null()).stderr(Stdio::null()); + } + + let status = cmd .status() .with_context(|| format!("Failed to execute process in {}", repo_path.display()))?; @@ -74,7 +79,7 @@ pub(crate) fn sync(schemes_path: &Path, is_quiet: bool) -> Result<()> { let is_diff = git_diff(schemes_path)?; if !is_diff { - git_pull(schemes_path).with_context(|| { + git_pull(schemes_path, is_quiet).with_context(|| { format!("Error pulling {} from {}", SCHEMES_REPO_NAME, SCHEMES_URL) })?;