Fix downloading the windows nox artifact

This commit is contained in:
Pedro Algarvio 2024-02-27 08:03:26 +00:00
parent 3884ef9652
commit 104f94950a

View file

@ -119,6 +119,28 @@ def download_nox_artifact(
assert arch is not None
assert platform is not None
if platform == "windows":
if arch in ("x64", "x86_64"):
ctx.info(f"Turning passed arch {arch!r} into 'amd64'")
arch = "amd64"
if arch not in ("amd64", "x86"):
ctx.error(
"The allowed values for '--arch' on Windows are 'amd64' and 'x86'"
)
return ExitCode.FAIL
else:
if arch == "arm64":
ctx.info(f"Turning passed arch {arch!r} into 'aarch64'")
arch = "aarch64"
elif arch == "x64":
ctx.info(f"Turning passed arch {arch!r} into 'x86_64'")
arch = "x86_64"
if arch not in ("x86_64", "aarch64"):
ctx.error(
f"The allowed values for '--arch' on {platform.title()} are 'x86_64', 'aarch64' or 'arm64'"
)
return ExitCode.FAIL
artifacts_path = tools.utils.REPO_ROOT / ".nox" / nox_env
if artifacts_path.exists():
ctx.error(