mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-06 05:51:15 +08:00
fix(mac): scope restart log by worktree
This commit is contained in:
@@ -15,7 +15,7 @@ LOCK_KEY="$(printf '%s' "${ROOT_DIR}" | shasum -a 256 | cut -c1-8)"
|
||||
LOCK_DIR="${TMPDIR:-/tmp}/openclaw-restart-${LOCK_KEY}"
|
||||
LOCK_PID_FILE="${LOCK_DIR}/pid"
|
||||
WAIT_FOR_LOCK=0
|
||||
LOG_PATH="${OPENCLAW_RESTART_LOG:-/tmp/openclaw-restart.log}"
|
||||
LOG_PATH="${OPENCLAW_RESTART_LOG:-${TMPDIR:-/tmp}/openclaw-restart-${LOCK_KEY}.log}"
|
||||
NO_SIGN=0
|
||||
SIGN=0
|
||||
AUTO_DETECT_SIGNING=1
|
||||
|
||||
@@ -74,6 +74,15 @@ describe("scripts/restart-mac.sh", () => {
|
||||
expect(script).not.toContain("lsof -iTCP:${GATEWAY_PORT} -sTCP:LISTEN | head -n 5 || true");
|
||||
});
|
||||
|
||||
it("keeps the default restart log scoped to the current worktree lock", () => {
|
||||
const script = readFileSync(restartScriptPath, "utf8");
|
||||
|
||||
expect(script).toContain(
|
||||
'LOG_PATH="${OPENCLAW_RESTART_LOG:-${TMPDIR:-/tmp}/openclaw-restart-${LOCK_KEY}.log}"',
|
||||
);
|
||||
expect(script).not.toContain('LOG_PATH="${OPENCLAW_RESTART_LOG:-/tmp/openclaw-restart.log}"');
|
||||
});
|
||||
|
||||
it("prefers the freshly packaged app unless an explicit app bundle is set", () => {
|
||||
const script = readFileSync(restartScriptPath, "utf8");
|
||||
const chooseBlock = script.slice(
|
||||
|
||||
Reference in New Issue
Block a user