Skip to content

Commit e8c0410

Browse files
metiu1claude
andcommitted
fix(update): Windows in-app update self-locked the uv venv
The menu/CLI update ran `uv tool install` in the foreground, but on Windows this process is a child of the uv-venv python.exe that keeps ...\uv\tools\vortelio\Scripts open. uv then can't remove the old Scripts ("Access denied", os error 5) and leaves a corrupt, half-removed install (uv tool list can't find the package). Route the Windows path through the existing detached updater, which waits for this whole process tree to exit before reinstalling, so nothing locks the venv. Unix keeps the foreground path. Ship rebuilt 0.3.83 binary. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent b78a5d9 commit e8c0410

6 files changed

Lines changed: 27 additions & 7 deletions

File tree

vortelio-pip/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "vortelio"
7-
version = "0.3.82"
7+
version = "0.3.83"
88
description = "Local-first AI platform. Run LLMs, generate images & video, transcribe audio, create 3D — on your own machine. OpenAI & Ollama API compatible. Apache 2.0."
99
readme = "README.md"
1010
requires-python = ">=3.8"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.3.82"
1+
__version__ = "0.3.83"

vortelio-pip/src/vortelio_cli/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import urllib.request
1111
from pathlib import Path
1212

13-
VERSION = "0.3.82"
13+
VERSION = "0.3.83"
1414
RELEASE_BASE = os.environ.get(
1515
"VORTELIO_RELEASE_BASE",
1616
f"https://github.com/metiu1/Vortelio/releases/download/v{VERSION}",
-512 Bytes
Binary file not shown.

vortelio/internal/cli/commands/update.go

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package commands
22

33
import (
44
"fmt"
5+
"runtime"
56
"strings"
67
"time"
78

@@ -45,9 +46,28 @@ func (c *UpdateCommand) Run(args []string) error {
4546
return nil
4647
}
4748

48-
// Run the install in the foreground so the user sees uv's progress and
49-
// knows exactly when it finishes. (The detached updater is only for the
50-
// GUI, where the running server has to shut down and restart itself.)
49+
// On Windows a foreground `uv tool install` always self-destructs: this
50+
// process is launched by the uv-venv python.exe (in ...\uv\tools\vortelio\
51+
// Scripts), which stays alive holding that dir open while we run. uv then
52+
// can't remove the old Scripts and aborts with "Access denied", leaving a
53+
// half-removed, corrupt install. Hand off to a detached updater that first
54+
// waits for this whole process tree to exit, then reinstalls with nothing
55+
// locking the venv. The caller exits right after, releasing the lock.
56+
if runtime.GOOS == "windows" {
57+
res, err := updater.StartDetached(false)
58+
if err != nil {
59+
return fmt.Errorf("aggiornamento fallito: %w", err)
60+
}
61+
fmt.Println(res.Message)
62+
if res.LogPath != "" {
63+
fmt.Printf("Log: %s\n", res.LogPath)
64+
}
65+
fmt.Println("Vortelio si chiude ora. Riaprilo tra qualche secondo con: vortelio")
66+
return nil
67+
}
68+
69+
// Unix: no venv lock (uv can replace open files), so stream uv's progress
70+
// in the foreground and block until it finishes.
5171
fmt.Println("Aggiornamento in corso — non chiudere il terminale…")
5272
if err := updater.InstallForeground(); err != nil {
5373
return fmt.Errorf("aggiornamento fallito: %w", err)

vortelio/internal/version/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ package version
33
// Version è impostabile a build time via:
44
//
55
// -ldflags "-X github.com/vortelio/vortelio/internal/version.Version=X.Y.Z"
6-
var Version = "0.3.82"
6+
var Version = "0.3.83"

0 commit comments

Comments
 (0)