mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-10-26 13:16:24 +00:00
test(deploy): recognize the Docker CLI as docker.exe in the real_docker fixture (#6262)
Path(client).name == "docker" misses the Windows CLI (docker.EXE), so every real-compose test routed through the standalone-Compose wrapper, whose shift strips the compose subcommand; the root CLI then rejected the script's --env-file probe with "unknown flag: --env-file". Compare the stem instead so the CLI is recognized on Windows too. Root cause identified by @xihongshichaojidan8 in #6259. Fixes #6261 Co-authored-by: xiaodu55 <xiaodu55@users.noreply.github.com>
This commit is contained in:
parent
648870b590
commit
4b0c512d65
@ -314,7 +314,11 @@ real_compose = pytest.mark.parametrize(
|
||||
@pytest.fixture
|
||||
def real_docker(client: str, tmp_path: Path) -> str:
|
||||
"""A `docker`-shaped entry point for the client: the CLI itself, or a shim that drops the `compose` word for a standalone binary."""
|
||||
if Path(client).name == "docker":
|
||||
# The Docker CLI is docker.exe on Windows: compare the stem so the CLI is
|
||||
# recognized there too. Feeding it through the standalone wrapper would
|
||||
# strip the `compose` subcommand, and the root CLI then rejects the
|
||||
# script's --env-file probe with "unknown flag: --env-file".
|
||||
if Path(client).stem.lower() == "docker":
|
||||
return client
|
||||
shim = tmp_path / "compose-shim" / "docker"
|
||||
shim.parent.mkdir()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user