mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-25 02:15:08 +00:00
feat(post-scripts): show a spinner while waiting for a script
This commit is contained in:
@@ -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",
|
||||||
|
|||||||
Reference in New Issue
Block a user