test(parallels): reset macos state after restore · openclaw/openclaw@a968f4f
steipete
·
2026-04-29
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1393,6 +1393,17 @@ EOF
|
1393 | 1393 | guest_current_user_exec /bin/bash -lc "$cmd" |
1394 | 1394 | } |
1395 | 1395 | |
| 1396 | +reset_openclaw_user_state() { |
| 1397 | + guest_current_user_sh "$(cat <<'EOF' |
| 1398 | +/usr/bin/pkill -f 'openclaw.*gateway run' >/dev/null 2>&1 || true |
| 1399 | +/usr/bin/pkill -f 'openclaw-gateway' >/dev/null 2>&1 || true |
| 1400 | +/usr/bin/pkill -f 'openclaw.mjs gateway' >/dev/null 2>&1 || true |
| 1401 | +rm -rf "$HOME/.openclaw" |
| 1402 | +rm -f /tmp/openclaw-parallels-macos-gateway.log |
| 1403 | +EOF |
| 1404 | + )" |
| 1405 | +} |
| 1406 | + |
1396 | 1407 | run_ref_onboard() { |
1397 | 1408 | local daemon_args=("--install-daemon") |
1398 | 1409 | if headless_guest_fallback; then |
@@ -1944,6 +1955,7 @@ run_fresh_main_lane() {
|
1944 | 1955 | local snapshot_id="$1" |
1945 | 1956 | local host_ip="$2" |
1946 | 1957 | phase_run "fresh.restore-snapshot" "$TIMEOUT_SNAPSHOT_S" restore_snapshot "$snapshot_id" |
| 1958 | + phase_run "fresh.reset-state" "$TIMEOUT_VERIFY_S" reset_openclaw_user_state |
1947 | 1959 | phase_run "fresh.install-main" "$(install_main_timeout)" install_main_tgz "$host_ip" "openclaw-main-fresh.tgz" |
1948 | 1960 | FRESH_MAIN_VERSION="$(extract_last_version "$(phase_log_path fresh.install-main)")" |
1949 | 1961 | phase_run "fresh.verify-main-version" "$TIMEOUT_VERIFY_S" verify_target_version |
@@ -1971,6 +1983,7 @@ run_upgrade_lane() {
|
1971 | 1983 | local snapshot_id="$1" |
1972 | 1984 | local host_ip="$2" |
1973 | 1985 | phase_run "upgrade.restore-snapshot" "$TIMEOUT_SNAPSHOT_S" restore_snapshot "$snapshot_id" |
| 1986 | + phase_run "upgrade.reset-state" "$TIMEOUT_VERIFY_S" reset_openclaw_user_state |
1974 | 1987 | phase_run "upgrade.install-latest" "$TIMEOUT_INSTALL_SITE_S" install_latest_release |
1975 | 1988 | LATEST_INSTALLED_VERSION="$(extract_last_version "$(phase_log_path upgrade.install-latest)")" |
1976 | 1989 | phase_run "upgrade.verify-latest-version" "$TIMEOUT_VERIFY_S" verify_version_contains "$INSTALL_VERSION" |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。