diff options
Diffstat (limited to 'app/selfupdate.py')
| -rw-r--r-- | app/selfupdate.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/app/selfupdate.py b/app/selfupdate.py index 239db92..95e0ef4 100644 --- a/app/selfupdate.py +++ b/app/selfupdate.py @@ -15,8 +15,9 @@ update can never silently overwrite user configuration with upstream's new version. A kept file whose upstream version changed is reported, so new upstream options can be merged by hand. -Run via the hub's Configure Backends > Update Generator action; the -module is stdlib-only like ``backends.common`` / ``backends.envs``. +Run via the hub's Configure Backends > Update tts-audiobook-generator +action; the module is stdlib-only like ``backends.common`` / +``backends.envs``. """ from pathlib import Path @@ -165,7 +166,8 @@ def update_generator(*, emit=None, cancel=None, branch = common.origin_default_branch(base) remote = _rev_parse(base, f"origin/{branch}") if remote is not None and _rev_parse(base, "HEAD") == remote: - _say(f"[INFO] The generator is already up to date ({remote}).", emit) + _say(f"[INFO] tts-audiobook-generator is already up to date " + f"({remote}).", emit) _restore(snapshot, base) return 0 @@ -177,4 +179,10 @@ def update_generator(*, emit=None, cancel=None, for rel in _restore(snapshot, base): _say(f"[OK] Kept your local {rel} (upstream's changes to it were " "skipped — merge new options by hand if needed).", emit) + if not reset_rc: + # The fresh code loads on relaunch (where requirements re-install + # runs automatically) — the console says so because the hub no + # longer flashes after the task view's own summary. + _say("[OK] Restart to apply the update — requirements re-install " + "runs automatically on next launch.", emit) return reset_rc |
