feat(post-scripts): show a spinner while waiting for a script

This commit is contained in:
imSp4rky
2026-08-25 19:57:40 -06:00
parent 40cad41cc4
commit a13081b14f
+3 -1
View File
@@ -23,6 +23,7 @@ from pathlib import Path
from typing import Any, Iterator, Optional, Sequence from typing import Any, Iterator, Optional, Sequence
from unshackle.core.config import config from unshackle.core.config import config
from unshackle.core.console import console
from unshackle.core.utilities import log_event from unshackle.core.utilities import log_event
from unshackle.core.utils.redact import redact_path, redact_text from unshackle.core.utils.redact import redact_path, redact_text
@@ -231,7 +232,8 @@ def dispatch(event: str, mode: str, context: dict[str, str], overrides: Sequence
log.warning("Post-script failed to start (%s): %s", e, redact_text(redact_path(argv[0]))) log.warning("Post-script failed to start (%s): %s", e, redact_text(redact_path(argv[0])))
continue continue
if wait: if wait:
rc = proc.wait() with console.status(f"Waiting for post-script ({redact_path(argv[0])})...", spinner="dots"):
rc = proc.wait()
log.debug("Post-script exited %s: %s", rc, safe_command) log.debug("Post-script exited %s: %s", rc, safe_command)
log_event( log_event(
"post_script_exit", "post_script_exit",