Skip to content

Commit f211477

Browse files
committed
fix: don't write the schema on dry runs.
1 parent 493f693 commit f211477

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tasks/ast_codegen/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ fn main() -> std::result::Result<(), Box<dyn std::error::Error>> {
248248
cargo_fmt(".")?;
249249
}
250250

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

0 commit comments

Comments
 (0)