diff --git a/src/cli/src/cmd/diff.rs b/src/cli/src/cmd/diff.rs index 2619319df..30277e43e 100644 --- a/src/cli/src/cmd/diff.rs +++ b/src/cli/src/cmd/diff.rs @@ -234,16 +234,16 @@ impl DiffCmd { result: &mut DiffResult, output: Option, ) -> 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"); + } } }