Skip to content

Commit

Permalink
fix println when output is not supplied on text diff
Browse files Browse the repository at this point in the history
  • Loading branch information
gschoeni committed Jan 6, 2025
1 parent 2d46e43 commit ed20d4d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/cli/src/cmd/diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,16 +234,16 @@ impl DiffCmd {
result: &mut DiffResult,
output: Option<PathBuf>,
) -> Result<(), OxenError> {
match result {
DiffResult::Tabular(result) => {
let mut df = result.contents.clone();
// Save to disk if we have an output
if let Some(file_path) = output {
// Save to disk if we have an output
if let Some(file_path) = output {
match result {
DiffResult::Tabular(result) => {
let mut df = result.contents.clone();
tabular::write_df(&mut df, file_path.clone())?;
}
}
DiffResult::Text(_) => {
println!("Saving to disk not supported for text output");
DiffResult::Text(_) => {
println!("Saving to disk not supported for text output");
}
}
}

Expand Down

0 comments on commit ed20d4d

Please sign in to comment.