test(parallels): prefer arm64 mingit downloads · openclaw/openclaw@c24c8ba
steipete
·
2026-04-29
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1029,11 +1029,24 @@ for wanted in preferred_names:
|
1029 | 1029 | break |
1030 | 1030 | |
1031 | 1031 | if best is None: |
| 1032 | + candidates = [] |
1032 | 1033 | for asset in assets: |
1033 | 1034 | name = asset.get("name", "") |
1034 | | - if name.startswith("MinGit-") and name.endswith(".zip") and "busybox" not in name: |
1035 | | - best = asset |
1036 | | - break |
| 1035 | + if not (name.startswith("MinGit-") and name.endswith(".zip")): |
| 1036 | + continue |
| 1037 | + if "busybox" in name: |
| 1038 | + continue |
| 1039 | + if "-arm64." in name: |
| 1040 | + rank = 0 |
| 1041 | + elif "-64-bit." in name: |
| 1042 | + rank = 1 |
| 1043 | + elif "-32-bit." in name: |
| 1044 | + rank = 2 |
| 1045 | + else: |
| 1046 | + rank = 3 |
| 1047 | + candidates.append((rank, name, asset)) |
| 1048 | + if candidates: |
| 1049 | + best = sorted(candidates, key=lambda item: (item[0], item[1]))[0][2] |
1037 | 1050 | |
1038 | 1051 | if best is None: |
1039 | 1052 | raise SystemExit("no MinGit asset found") |
@@ -1137,7 +1150,7 @@ ensure_mingit_zip() {
|
1137 | 1150 | MINGIT_ZIP_PATH="$MAIN_TGZ_DIR/$mingit_name" |
1138 | 1151 | if [[ ! -f "$MINGIT_ZIP_PATH" ]]; then |
1139 | 1152 | say "Download $MINGIT_ZIP_NAME" |
1140 | | - curl -fsSL "$mingit_url" -o "$MINGIT_ZIP_PATH" |
| 1153 | + curl --retry 5 --retry-delay 3 --retry-all-errors -fsSL "$mingit_url" -o "$MINGIT_ZIP_PATH" |
1141 | 1154 | fi |
1142 | 1155 | } |
1143 | 1156 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。