






















@@ -2407,6 +2407,27 @@ describe.concurrent("scripts/crabbox-wrapper", () => {
24072407expectGroupedShellCommand(remoteCommand, `${remoteChangedGateExport} ${shellScript}`);
24082408});
240924092410+it("does not mistake quoted remote-child markers for shell changed-gate environment", () => {
2411+const shellScript = 'echo "OPENCLAW_CHECK_CHANGED_REMOTE_CHILD=1"; pnpm check:changed';
2412+const result = runWrapper(
2413+"provider: hetzner, aws, local-container, blacksmith-testbox, or cloudflare\n",
2414+["run", "--provider", "aws", "--target", "macos", "--shell", "--", shellScript],
2415+{
2416+gitResponses: {
2417+[GIT_CONFIG_SPARSE_KEY]: { stdout: "true\n" },
2418+[GIT_STATUS_PORCELAIN_KEY]: { stdout: "" },
2419+[GIT_MERGE_BASE_MAIN_HEAD_KEY]: { stdout: "abc123\n" },
2420+},
2421+},
2422+);
2423+2424+const output = parseFakeCrabboxOutput(result);
2425+const remoteCommand = normalizeShellLineEndings(output.args.at(-1) ?? "");
2426+expect(result.status).toBe(0);
2427+expect(remoteCommand).toContain(remoteChangedGateFetch);
2428+expectGroupedShellCommand(remoteCommand, `${remoteChangedGateExport} ${shellScript}`);
2429+});
2430+24102431it("preserves sparse changed-gate Git bootstrap for assignment-prefix command substitutions", () => {
24112432const shellScript = "TOOL_ROOT=$(pwd) pnpm check:changed";
24122433const result = runWrapper(
@@ -2469,9 +2490,7 @@ describe.concurrent("scripts/crabbox-wrapper", () => {
24692490expect(result.status).toBe(0);
24702491expect(remoteCommand).toContain("git init -q");
24712492expect(remoteCommand).toContain(remoteChangedGateFetch);
2472-expect(remoteCommand).toContain(
2473-`&& export OPENCLAW_CHECK_CHANGED_REMOTE_CHILD=1 OPENCLAW_CHANGED_LANES_RAW_SYNC=1; ${shellScript}`,
2474-);
2493+expect(remoteCommand).toContain(`&& export ${remoteChangedGateEnvPrefix}; ${shellScript}`);
24752494});
2476249524772496it("preserves sparse changed-gate Git bootstrap for shell option values before -c", () => {
@@ -2933,7 +2952,7 @@ describe.concurrent("scripts/crabbox-wrapper", () => {
29332952expect(output.args.filter((arg) => arg === "--shell")).toHaveLength(1);
29342953expect(remoteCommand).toContain(remoteChangedGateFetch);
29352954expect(remoteCommand).toMatch(
2936-/&& export OPENCLAW_CHECK_CHANGED_REMOTE_CHILD=1 OPENCLAW_CHANGED_LANES_RAW_SYNC=1; env CI=1 pnpm check:changed$/u,
2955+/&& export OPENCLAW_CHECK_CHANGED_REMOTE_CHILD=1 OPENCLAW_CHANGED_LANES_RAW_SYNC=1 CI=1; env CI=1 pnpm check:changed$/u,
29372956);
29382957});
29392958此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。