Skip to content

Commit

Permalink
Fix EDGEDB_CLOUD_PROFILE options layer
Browse files Browse the repository at this point in the history
  • Loading branch information
fantix committed Feb 9, 2023
1 parent df1f6fb commit 076e8c8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions edgedb/con_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,6 @@ def _parse_connect_dsn_and_args(
if dsn is not None and re.match('(?i)^[a-z]+://', dsn)
else (None, dsn)
)
cloud_profile = os.getenv('EDGEDB_CLOUD_PROFILE')

has_compound_options = _resolve_config_options(
resolved_config,
Expand Down Expand Up @@ -578,11 +577,6 @@ def _parse_connect_dsn_and_args(
(wait_until_available, '"wait_until_available" option')
if wait_until_available is not None else None
),
cloud_profile=(
(cloud_profile,
'"EDGEDB_CLOUD_PROFILE" environment variable')
if cloud_profile is not None else None
),
)

if has_compound_options is False:
Expand All @@ -608,6 +602,7 @@ def _parse_connect_dsn_and_args(
env_tls_ca_file = os.getenv('EDGEDB_TLS_CA_FILE')
env_tls_security = os.getenv('EDGEDB_CLIENT_TLS_SECURITY')
env_wait_until_available = os.getenv('EDGEDB_WAIT_UNTIL_AVAILABLE')
cloud_profile = os.getenv('EDGEDB_CLOUD_PROFILE')

has_compound_options = _resolve_config_options(
resolved_config,
Expand Down Expand Up @@ -670,6 +665,11 @@ def _parse_connect_dsn_and_args(
'"EDGEDB_WAIT_UNTIL_AVAILABLE" environment variable'
) if env_wait_until_available is not None else None
),
cloud_profile=(
(cloud_profile,
'"EDGEDB_CLOUD_PROFILE" environment variable')
if cloud_profile is not None else None
),
)

if not has_compound_options:
Expand Down
2 changes: 1 addition & 1 deletion tests/shared-client-testcases

0 comments on commit 076e8c8

Please sign in to comment.