Skip to content

Commit

Permalink
fix: Show stdout when invoking chezmoi add
Browse files Browse the repository at this point in the history
This can unfortunately not be easily tested without setting up fully external
integration tests that inspects stdout of a session using the real chezmoi.

Fixes #176
  • Loading branch information
VorpalBlade committed Nov 20, 2024
1 parent a215d3d commit 19da051
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,7 @@ impl Chezmoi for RealChezmoi {
}

fn add(&self, path: &Utf8Path) -> anyhow::Result<()> {
let out = cmd!("chezmoi", "add", path)
.stdout_null()
.unchecked()
.run()?;
let out = cmd!("chezmoi", "add", path).unchecked().run()?;
if !out.status.success() {
return Err(anyhow!("chezmoi add failed with error code {}", out.status));
}
Expand Down

0 comments on commit 19da051

Please sign in to comment.