Skip to content

Commit

Permalink
dirty workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
dennybiasiolli committed Feb 22, 2024
1 parent dfc6cd3 commit c836378
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion diesel_cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,11 @@ fn create_config_file(
&format!("dir = \"{}\"", migrations_dir.display()),
);
let mut file = fs::File::create(path)?;
file.write_all(modified_content.as_bytes())?;
if migrations_dir.is_relative() {
file.write_all(modified_content.as_bytes())?;
} else {
file.write_all(source_content.as_bytes())?;
}
}

Ok(())
Expand Down

0 comments on commit c836378

Please sign in to comment.