diff --git a/src/conductor/config/loader.py b/src/conductor/config/loader.py index c304f4fc..6ecc7d02 100644 --- a/src/conductor/config/loader.py +++ b/src/conductor/config/loader.py @@ -60,7 +60,7 @@ def replace_env_var(match: re.Match) -> str: raise ConfigurationError( f"Required environment variable '{var_name}' is not set", suggestion=f"Set the environment variable '{var_name}' or provide a default " - f"value using the syntax: ${{{{{{var_name}}}}:-default_value}}", + "value using the syntax: " + "${" + var_name + ":-default_value}", ) # Perform substitution diff --git a/tests/test_config/test_loader.py b/tests/test_config/test_loader.py index 74130c95..810d8604 100644 --- a/tests/test_config/test_loader.py +++ b/tests/test_config/test_loader.py @@ -58,6 +58,7 @@ def test_resolve_missing_required_env_var_raises(self) -> None: resolve_env_vars("${REQUIRED_VAR}") assert "REQUIRED_VAR" in str(exc_info.value) assert "not set" in str(exc_info.value) + assert "${REQUIRED_VAR:-default_value}" in str(exc_info.value) def test_resolve_empty_default(self) -> None: """Test that empty default is allowed."""