Try fixing installing 32-bit go, and try fixing 32-bit paths in scripts

This commit is contained in:
Micah Lee 2022-03-30 15:52:31 -07:00
parent c8a4330b63
commit 21b4ec756b
3 changed files with 35 additions and 15 deletions

View file

@ -26,13 +26,25 @@ and hard-code the sha256 hash.
"""
import shutil
import os
import sys
import subprocess
import inspect
import platform
def main():
if shutil.which("go") is None:
# Figure out the architecture and python path
if "64 bit" in sys.version:
python_arch = "win-amd64"
else:
python_arch = "win32"
if os.getlogin() == "circleci" and python_arch == "win32":
go_path = "C:\\Program Files (x86)\\Go\\bin\\go"
else:
go_path = shutil.which("go")
if go_path is None:
print("Install go: https://golang.org/doc/install")
return