mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-23 03:11:32 +00:00
find migrations dir in debug mode using CARGO_MANIFEST_DIR variable instead of current working directory
This commit is contained in:
parent
f044ef3321
commit
7308dc8632
1 changed files with 4 additions and 2 deletions
|
@ -39,7 +39,9 @@ fn migrations() -> diesel_migrations::EmbeddedMigrations {
|
||||||
#[cfg(debug_assertions)]
|
#[cfg(debug_assertions)]
|
||||||
#[expect(clippy::expect_used)]
|
#[expect(clippy::expect_used)]
|
||||||
fn migrations() -> diesel_migrations::FileBasedMigrations {
|
fn migrations() -> diesel_migrations::FileBasedMigrations {
|
||||||
diesel_migrations::FileBasedMigrations::find_migrations_directory()
|
diesel_migrations::FileBasedMigrations::find_migrations_directory_in_path(env!(
|
||||||
|
"CARGO_MANIFEST_DIR"
|
||||||
|
))
|
||||||
.expect("failed to get migration source")
|
.expect("failed to get migration source")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue