fix(install): kill running muyue before extracting (v0.7.7)
All checks were successful
PR Check / check (pull_request) Successful in 1m3s
All checks were successful
PR Check / check (pull_request) Successful in 1m3s
User reported v0.7.6 install silently no-op'd when v0.7.5 was still
running:
$dest = "$env:LOCALAPPDATA\Muyue"
Expand-Archive -Path "$env:TEMP\muyue.zip" -DestinationPath $dest -Force
# No error, but the running v0.7.5 .exe stays in place because
# Windows refuses to overwrite a locked file. After 'install', the
# 'muyue' command still launches v0.7.5.
Add a Stop-Process step at the top of the install snippet:
Get-Process muyue, muyue-windows-amd64 -ErrorAction SilentlyContinue |
Stop-Process -Force
Start-Sleep -Milliseconds 500
-ErrorAction SilentlyContinue makes it idempotent (no error on a
clean first install). The 500ms sleep gives Windows time to release
the file handle before Expand-Archive opens the destination paths.
Snippet bumps to 6 lines; explanatory note added so users updating
from a previous version know why this step matters.
- internal/version/version.go: 0.7.6 → 0.7.7
- CHANGELOG.md: v0.7.7 entry
This commit is contained in:
14
CHANGELOG.md
14
CHANGELOG.md
@@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
||||
|
||||
## v0.7.7
|
||||
|
||||
### Fix : install Windows échoue silencieusement quand une version précédente tourne
|
||||
|
||||
Symptôme rapporté en mettant à jour de v0.7.5 → v0.7.6 : `Expand-Archive ... -Force` semble réussir mais le `.exe` n'est en réalité pas écrasé (Windows refuse de remplacer un fichier verrouillé), donc après l'install, `muyue` lance toujours l'ancienne version. Aucun message d'erreur visible — d'où le côté traître.
|
||||
|
||||
**Fix** : ajout d'une 1ʳᵉ ligne au snippet d'install qui tue toute instance Muyue déjà lancée :
|
||||
|
||||
```powershell
|
||||
Get-Process muyue, muyue-windows-amd64 -ErrorAction SilentlyContinue | Stop-Process -Force; Start-Sleep -Milliseconds 500
|
||||
```
|
||||
|
||||
`-ErrorAction SilentlyContinue` rend l'étape idempotente (pas d'erreur si rien ne tourne, cas d'install propre). Le `Start-Sleep` 500ms laisse Windows libérer le file handle. Le snippet officiel passe à 6 lignes ; une note explicative est ajoutée dans la section *Install* du changelog généré.
|
||||
|
||||
## v0.7.6
|
||||
|
||||
### Trois fixes Windows + une amélioration agent
|
||||
|
||||
Reference in New Issue
Block a user