From 922b3b7dbd8d6af2adf16a1d6b8716d5922aaf46 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 26 Oct 2021 08:06:12 +1000 Subject: [PATCH] `arch` is not in POSIX https://github.com/ankitects/anki/commit/ee644e08a347a2224afaa6dde3ee2e038f61b8f8#commitcomment-58626200 --- python/python.bzl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/python.bzl b/python/python.bzl index f6fd1830c..c1cb2b2d2 100644 --- a/python/python.bzl +++ b/python/python.bzl @@ -24,7 +24,7 @@ _python_distros = { } def _unix_arch(rctx): - result = rctx.execute(["arch"]) + result = rctx.execute(["uname", "-m"]) if result.return_code: fail("invoking arch failed", result.stderr) return result.stdout.strip() @@ -32,7 +32,7 @@ def _unix_arch(rctx): def _get_platform(rctx): if rctx.os.name == "mac os x": arch = _unix_arch(rctx) - if arch == "i386": + if arch == "x86_64": return "macos_amd64" elif arch == "arm64": return "macos_arm64"