Skip to content

Commit

Permalink
fix: .json file check, transformation formats check
Browse files Browse the repository at this point in the history
  • Loading branch information
Oran-Dan committed Sep 6, 2024
1 parent ad48129 commit 2e61861
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/backend/headless_cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ pub fn check_args(cli_args: &Args) -> Result<()> {
}
}
if let Some(output_f) = &cli_args.output_file {
if output_f.ends_with(".json") {
if !output_f.ends_with(".json") {
panic!("The output file path doesn't end with \".json\": {}", output_f);
}
}
Expand Down
7 changes: 6 additions & 1 deletion src/backend/repository.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ impl Repository {
return;
}

trace_dbg!(&source_format);
let source_credential = self.get(&source_format).unwrap();

// custom code to handle the special character '@' in the source_path
Expand Down Expand Up @@ -90,6 +89,12 @@ impl Repository {
sources,
destination,
} => {
if sources.iter().any(|source| source.format != mapping.input_format())
|| destination.format != mapping.output_format()
{
return;
}

let source_values = sources
.iter()
.map(|source| {
Expand Down

0 comments on commit 2e61861

Please sign in to comment.