Skip to content

Commit

Permalink
fix: don't write the schema on dry runs.
Browse files Browse the repository at this point in the history
  • Loading branch information
rzvxa committed Jul 8, 2024
1 parent 493f693 commit f211477
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tasks/ast_codegen/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ fn main() -> std::result::Result<(), Box<dyn std::error::Error>> {
cargo_fmt(".")?;
}

if let Some(schema_path) = cli_options.schema {
if let CliOptions { schema: Some(schema_path), dry_run: false, .. } = cli_options {
let path = schema_path.to_str().expect("invalid path for schema output.");
let schema = serde_json::to_string_pretty(&schema).map_err(|e| e.to_string())?;
write_all_to(schema.as_bytes(), path)?;
Expand Down

0 comments on commit f211477

Please sign in to comment.