mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
fix(crabbox): keep untrusted bootstrap pnpm pin current (#113728)
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
node_version="24.15.0"
|
node_version="24.15.0"
|
||||||
pnpm_spec="pnpm@11.2.2+sha512.36e6621fad506178936455e70247b8808ef4ec25797a9f437a93281a020484e2607f6a469a22e982987c3dbb8866e3071514ab10a4a1749e06edcd1ec118436f"
|
pnpm_spec="pnpm@11.15.1+sha512.81350b07e53c9538a02f1f2303b4290fa2d7be04e56e2a970c4cc4b417dc761de196edabd49d55c7dc9580db81007c44143e4e3d7e462b3000d23c255122d065"
|
||||||
|
|
||||||
if [[ $# -lt 2 ]]; then
|
if [[ $# -lt 2 ]]; then
|
||||||
echo "usage: $0 <expected-head-sha> <command> [args...]" >&2
|
echo "usage: $0 <expected-head-sha> <command> [args...]" >&2
|
||||||
|
|||||||
@@ -3,6 +3,16 @@ import { readFileSync } from "node:fs";
|
|||||||
import { describe, expect, it } from "vitest";
|
import { describe, expect, it } from "vitest";
|
||||||
|
|
||||||
describe("scripts/crabbox-untrusted-bootstrap.sh", () => {
|
describe("scripts/crabbox-untrusted-bootstrap.sh", () => {
|
||||||
|
it("pins the package manager required by the trusted checkout", () => {
|
||||||
|
const script = readFileSync("scripts/crabbox-untrusted-bootstrap.sh", "utf8");
|
||||||
|
const packageJson = JSON.parse(readFileSync("package.json", "utf8")) as {
|
||||||
|
packageManager?: string;
|
||||||
|
};
|
||||||
|
const pnpmSpec = script.match(/^pnpm_spec="([^"]+)"$/mu)?.[1];
|
||||||
|
|
||||||
|
expect(pnpmSpec).toBe(packageJson.packageManager);
|
||||||
|
});
|
||||||
|
|
||||||
it("bounds both IMDSv2 identity requests", () => {
|
it("bounds both IMDSv2 identity requests", () => {
|
||||||
const script = readFileSync("scripts/crabbox-untrusted-bootstrap.sh", "utf8");
|
const script = readFileSync("scripts/crabbox-untrusted-bootstrap.sh", "utf8");
|
||||||
const imdsRequests = script.match(
|
const imdsRequests = script.match(
|
||||||
|
|||||||
Reference in New Issue
Block a user