fix(installer): warn before daemon-reload when app is running#37
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ausgangsbefund
Beim Realtest des Installers im Modus B (
BLITZTEXT_NO_HOTKEY=1) auf dem gummi-Workstation hatscripts/install.shden Befehlsystemctl --user daemon-reloadausgeführt, währendblitztext-linuxaktiv lief. Die App wurde daraufhin sauber beendet (exit 0, SIGTERM überPartOf=graphical-session.target). Kein Datenverlust, aber das Verhalten war unerwartet und ohne Hinweis für den Nutzer.Änderung
Datei:
scripts/install.shVor
systemctl --user daemon-reloadwird geprüft, ob der systemd-User-Serviceblitztext-linuxgerade aktiv ist. Wenn ja, erscheinen zwei sichtbare[WARN]-Zeilen:Der
daemon-reloadwird danach trotzdem ausgeführt — kein Auto-Stop, kein Auto-Restart, keine blockierende Abfrage. Der Nutzer entscheidet selbst.Wenn der Service nicht läuft oder keine systemd-User-Sitzung verfügbar ist, läuft der Installer wie bisher unverändert weiter (
2>/dev/nullschluckt alle Fehler).Tests / Checks
bash -n scripts/install.shpython3 -m compileall app testsQT_QPA_PLATFORM=offscreen WHISPER_GUI_TESTS=1 python -m pytest -qgit diff --checkRestrisiko
Die Prüfung erkennt nur Instanzen, die über den systemd-User-Service
blitztext-linuxlaufen. Eine manuell gestartete App via./run.shoder direktempython -m blitztext_linuxwird nicht erkannt und erhält keine Warnung. Dieses Verhalten ist dokumentiert und akzeptiert.Rollback