Skip to content

Commit

Permalink
Respect EDGEDB_CLOUD_PROFILE and EDGEDB_SECRET_KEY when connecting to…
Browse files Browse the repository at this point in the history
… cloud

Cloud instances, unlike local instances, do not represent local
configuration, so `EDGEDB_CLOUD_PROFILE` and/or `EDGEDB_SECRET_KEY`
should be respected when connecting to such instances.
  • Loading branch information
elprans committed May 9, 2023
1 parent ac5886a commit 6b785ee
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions edgedb-tokio/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1315,8 +1315,12 @@ impl Builder {
self.credentials.is_some() ||
self.credentials_file.is_some()
{
cfg.secret_key = self.secret_key.clone();
cfg.cloud_profile = self.cloud_profile.clone();
if matches!(self.instance, Some(InstanceName::Cloud {..})) {
self.preliminary_env(&mut cfg, &mut errors).await;
} else {
cfg.secret_key = self.secret_key.clone();
cfg.cloud_profile = self.cloud_profile.clone();
}
self.compound_owned(&mut cfg, &mut errors).await;
self.granular_owned(&mut cfg, &mut errors).await;
true
Expand Down

0 comments on commit 6b785ee

Please # to comment.