test: source minimal install helper fixture · openclaw/openclaw@2c43c44
steipete
·
2026-04-18
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -28,6 +28,12 @@ function resolveInstallerVersionCases(params: {
|
2828}): string[] {
|
2929const installerPath = path.join(process.cwd(), "scripts", "install.sh");
|
3030const installerSource = fs.readFileSync(installerPath, "utf-8");
|
31+const versionHelperStart = installerSource.indexOf("load_install_version_helpers() {");
|
32+const versionHelperEnd = installerSource.indexOf("\nis_gateway_daemon_loaded() {");
|
33+if (versionHelperStart < 0 || versionHelperEnd < 0) {
|
34+throw new Error("install.sh version helper block not found");
|
35+}
|
36+const versionHelperSource = installerSource.slice(versionHelperStart, versionHelperEnd);
|
3137const output = execFileSync(
|
3238"bash",
|
3339[
|
@@ -40,7 +46,7 @@ done
|
4046(
|
4147 cd "$2"
|
4248 FAKE_OPENCLAW_BIN="\${@:1:1}" bash -s <<'OPENCLAW_STDIN_INSTALLER'
|
43-${installerSource}
|
49+${versionHelperSource}
|
4450OPENCLAW_BIN="$FAKE_OPENCLAW_BIN"
|
4551resolve_openclaw_version
|
4652OPENCLAW_STDIN_INSTALLER
|
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。