Skip to content

Commit 03d5a2b

Browse files
committed
fix: pass settings release_url when bundled flag is set
1 parent 0cb16e0 commit 03d5a2b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

postgresql_embedded/build/bundle.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ use std::{env, fs};
1414
/// self-contained binary that does not require the PostgreSQL archive to be
1515
/// downloaded at runtime.
1616
pub(crate) async fn stage_postgresql_archive() -> Result<()> {
17-
let releases_url = env::var("POSTGRESQL_RELEASES_URL").unwrap_or(DEFAULT_RELEASES_URL.to_string());
17+
let releases_url =
18+
env::var("POSTGRESQL_RELEASES_URL").unwrap_or(DEFAULT_RELEASES_URL.to_string());
1819
println!("PostgreSQL releases URL: {releases_url}");
1920
let postgres_version = env::var("POSTGRESQL_VERSION").unwrap_or(LATEST.to_string());
2021
let version = Version::from_str(postgres_version.as_str())?;

postgresql_embedded/src/postgresql.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ impl PostgreSQL {
197197
};
198198

199199
#[cfg(not(feature = "bundled"))]
200-
let (version, bytes) = { get_archive(&self.version).await? };
200+
let (version, bytes) = { get_archive(&self.settings.releases_url, &self.version).await? };
201201

202202
self.version = version;
203203
extract(&bytes, &self.settings.installation_dir).await?;

0 commit comments

Comments
 (0)