fix(e2e): retry macOS Parallels npm install · openclaw/openclaw@9bdf895
vincentkoc
·
2026-06-16
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -815,7 +815,16 @@ ${guestOpenClaw} --version`,
|
815 | 815 | if (this.targetInstallsDirectly()) { |
816 | 816 | this |
817 | 817 | .guestSh(`printf 'install-source: registry-spec %s\\n' ${shellQuote(this.options.targetPackageSpec || "")} |
818 | | -${guestNpm} install -g ${shellQuote(this.options.targetPackageSpec || "")} |
| 818 | +for attempt in 1 2; do |
| 819 | + if ${guestNpm} install -g ${shellQuote(this.options.targetPackageSpec || "")}; then |
| 820 | + break |
| 821 | + fi |
| 822 | + if [ "$attempt" -eq 2 ]; then |
| 823 | + exit 1 |
| 824 | + fi |
| 825 | + echo "npm install attempt $attempt failed; retrying in 5s" >&2 |
| 826 | + sleep 5 |
| 827 | +done |
819 | 828 | ${guestOpenClaw} --version`); |
820 | 829 | return; |
821 | 830 | } |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -941,6 +941,7 @@ if (isPrlctl) {
|
941 | 941 | |
942 | 942 | expect(macos).toContain('rm -rf "$HOME/.npm/_cacache"'); |
943 | 943 | expect(macos.match(/\.onboard-ref", 420/g)).toHaveLength(2); |
| 944 | +expect(macos).toContain('echo "npm install attempt $attempt failed; retrying in 5s"'); |
944 | 945 | }); |
945 | 946 | |
946 | 947 | it("provisions portable Git before Windows dev update lanes", () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。