def main(): allow_corp = sys.argv[1] == 'mac' and _IsCorpMachine() if os.environ.get('FORCE_MAC_TOOLCHAIN') or allow_corp: if not mac_toolchain.PlatformMeetsHermeticXcodeRequirements(): return "2" return "1" else: return "0"
def main(): parser = argparse.ArgumentParser(description='Download hermetic Xcode.') parser.add_argument('platform') args = parser.parse_args() force_toolchain = os.environ.get('FORCE_MAC_TOOLCHAIN') if force_toolchain and args.platform == 'ios': return "3" allow_corp = args.platform == 'mac' and _IsCorpMachine() if force_toolchain or allow_corp: if not mac_toolchain.PlatformMeetsHermeticXcodeRequirements(): return "2" return "1" else: return "0"