Skip to content

Commit

Permalink
cherry-picked launchbadge#2927
Browse files Browse the repository at this point in the history
  • Loading branch information
grim7reaper committed Jan 5, 2024
1 parent d104e2e commit 8ce9b3c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sqlx-macros-core/src/query/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,13 @@ pub fn expand_input<'a>(

// Check SQLX_OFFLINE_DIR, then local .sqlx, then workspace .sqlx.
let dirs = [
env("SQLX_OFFLINE_DIR").ok().map(PathBuf::from),
Some(METADATA.manifest_dir.join(".sqlx")),
Some(METADATA.workspace_root().join(".sqlx")),
|| env("SQLX_OFFLINE_DIR").ok().map(PathBuf::from),
|| Some(METADATA.manifest_dir.join(".sqlx")),
|| Some(METADATA.workspace_root().join(".sqlx")),
];
let Some(data_file_path) = dirs
.iter()
.filter_map(|path| path.as_ref())
.filter_map(|path| path())
.map(|path| path.join(&filename))
.find(|path| path.exists())
else {
Expand Down

0 comments on commit 8ce9b3c

Please sign in to comment.