Skip to content

Commit

Permalink
fix(env): experimental.system-git-client not recognised
Browse files Browse the repository at this point in the history
  • Loading branch information
miles170 committed Oct 12, 2022
1 parent 0ffe91c commit 1e930fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/poetry/vcs/git/backend.py
Expand Up @@ -367,7 +367,7 @@ def is_using_legacy_client() -> bool:
from poetry.config.config import Config

legacy_client: bool = (
Config.create().get("experimental", {}).get("system-git-client", False)
Config.create().get("experimental.system-git-client", False)
)
return legacy_client

Expand Down
4 changes: 4 additions & 0 deletions tests/integration/test_utils_vcs_git.py
Expand Up @@ -110,6 +110,10 @@ def remote_default_ref(_remote_refs: FetchPackResult) -> bytes:
def remote_default_branch(remote_default_ref: bytes) -> str:
return remote_default_ref.decode("utf-8").replace("refs/heads/", "")

def test_use_system_git_client_from_environment_variables():
os.environ["POETRY_EXPERIMENTAL_SYSTEM_GIT_CLIENT"] = "true"

assert(Git.is_using_legacy_client())

def test_git_local_info(
source_url: str, remote_refs: FetchPackResult, remote_default_ref: bytes
Expand Down

0 comments on commit 1e930fe

Please sign in to comment.