fix(update): reject openclaw source package targets

This commit is contained in:
Vincent Koc
2026-05-22 07:20:49 +08:00
parent fad1c8a071
commit 15a0156a8c
19 changed files with 254 additions and 36 deletions

View File

@@ -96,4 +96,17 @@ describe("install-cli.sh", () => {
expect(script).toContain('freshness_flag="--before=$(date -u');
expect(script).toContain("env -u NPM_CONFIG_BEFORE -u npm_config_before");
});
it("rejects OpenClaw GitHub source targets for npm installs", () => {
const result = runInstallCliShell(`
set -euo pipefail
source "${SCRIPT_PATH}"
OPENCLAW_VERSION=main
install_openclaw
`);
expect(result.status).toBe(1);
expect(result.stdout).toContain("npm installs do not support OpenClaw GitHub source targets");
expect(result.stdout).toContain("--install-method git --version main");
});
});