fix(crabbox): bootstrap macOS stdin shell scripts · openclaw/openclaw@141fb2b
vincentkoc
·
2026-06-21
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1462,6 +1462,28 @@ describe.concurrent("scripts/crabbox-wrapper", () => {
|
1462 | 1462 | expect(output.args.at(-1)).toBe("arg1"); |
1463 | 1463 | }); |
1464 | 1464 | |
| 1465 | +it("bootstraps AWS macOS script-stdin shell shebang bodies before the uploaded script", () => { |
| 1466 | +const script = [ |
| 1467 | +"#!/usr/bin/env bash", |
| 1468 | +"set -euo pipefail", |
| 1469 | +"pnpm --version", |
| 1470 | +"bun --version", |
| 1471 | +].join("\n"); |
| 1472 | +const result = runWrapper( |
| 1473 | +"provider: hetzner, aws, local-container, blacksmith-testbox, or cloudflare\n", |
| 1474 | +["run", "--provider", "aws", "--target", "macos", "--script-stdin"], |
| 1475 | +{ input: script }, |
| 1476 | +); |
| 1477 | + |
| 1478 | +const output = parseFakeCrabboxOutput(result); |
| 1479 | +expect(result.status).toBe(0); |
| 1480 | +expect(output.scriptContent).toContain("openclaw_crabbox_bootstrap_macos_js || exit $?"); |
| 1481 | +expect(output.scriptContent).toContain('corepack enable --install-directory "$PNPM_HOME"'); |
| 1482 | +expect(output.scriptContent).toContain("pnpm --version >&2"); |
| 1483 | +expect(output.scriptContent).toContain("bun --version >&2 || return 1"); |
| 1484 | +expect(output.scriptContent).toContain(`\n${script}\n`); |
| 1485 | +}); |
| 1486 | + |
1465 | 1487 | it("bootstraps Corepack for AWS macOS script-stdin env shebangs with option values", () => { |
1466 | 1488 | const script = [ |
1467 | 1489 | "#!/usr/bin/env -C /tmp -u OPENCLAW_FAKE_VAR pnpm", |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。