Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

fix(upgrade): restart after web update

cyh73596b50a71e
diff --git a/tests/test_upgrade_flow.py b/tests/test_upgrade_flow.py
index 730856ec2..53f655d93 100644
--- a/tests/test_upgrade_flow.py
+++ b/tests/test_upgrade_flow.py
@@ -336,6 +336,7 @@ def test_do_upgrade_uses_upgrade_plan_env_and_restarts(monkeypatch):
assert calls["popen_cmd"][1] == "-c"
assert "time.sleep(2.0)" in calls["popen_cmd"][2]
assert "/custom/bin/vibe" in calls["popen_cmd"][2]
+ assert "['/custom/bin/vibe', 'restart']" in calls["popen_cmd"][2]
assert calls["popen_kwargs"]["start_new_session"] is True
popen_cwd = calls["popen_kwargs"].get("cwd")
assert popen_cwd and os.path.isabs(popen_cwd), f"Popen cwd must be an absolute path, got {popen_cwd!r}"
diff --git a/vibe/api.py b/vibe/api.py
index b49875949..788fa9ea9 100644
--- a/vibe/api.py
+++ b/vibe/api.py
@@ -1009,8 +1009,9 @@ def do_upgrade(auto_restart: bool = True) -> dict:
if result.returncode == 0:
restarting = False
if auto_restart:
+ restart_command = [*get_restart_command(vibe_path=current_vibe_path), "restart"]
_spawn_delayed_restart(
- get_restart_command(vibe_path=current_vibe_path),
+ restart_command,
safe_cwd,
env=get_restart_environment(vibe_path=current_vibe_path),
)