fix: build monitor from cmd entrypoint

This commit is contained in:
2026-04-04 07:00:03 +00:00
parent e6e1c5395b
commit 485f8e117b

View File

@@ -191,7 +191,7 @@ function installManagedMonitor(openclawPath) {
mkdirSync(monitorDestDir, { recursive: true }); mkdirSync(monitorDestDir, { recursive: true });
try { try {
exec(`git clone --branch ${shellEscape(options.monitorBranch)} ${shellEscape(monitorRepo)} ${shellEscape(tmpDir)}`, { silent: !options.verbose }); exec(`git clone --branch ${shellEscape(options.monitorBranch)} ${shellEscape(monitorRepo)} ${shellEscape(tmpDir)}`, { silent: !options.verbose });
exec(`go build -o ${shellEscape(binaryPath)} .`, { cwd: tmpDir, silent: !options.verbose }); exec(`go build -o ${shellEscape(binaryPath)} ./cmd/harborforge-monitor`, { cwd: tmpDir, silent: !options.verbose });
chmodSync(binaryPath, 0o755); chmodSync(binaryPath, 0o755);
logOk(`Managed monitor installed → ${binaryPath} (branch hint: ${options.monitorBranch})`); logOk(`Managed monitor installed → ${binaryPath} (branch hint: ${options.monitorBranch})`);
return binaryPath; return binaryPath;