khh
Some checks failed
smoke-mm / Install & smoke test mm --help (push) Has been cancelled

This commit is contained in:
nose
2025-12-24 02:13:21 -08:00
parent 8bf04c6b71
commit 24dd18de7e
20 changed files with 1792 additions and 636 deletions

View File

@@ -1077,7 +1077,11 @@ def _run(result: Any, args: Sequence[str], config: Dict[str, Any]) -> int:
# Handle Save Playlist
if save_mode:
playlist_name = index_arg or f"Playlist {subprocess.check_output(['date', '/t'], shell=True).decode().strip()}"
# Avoid `shell=True` / `date /t` on Windows (can flash a cmd.exe window).
# Use Python's datetime instead.
from datetime import datetime
playlist_name = index_arg or f"Playlist {datetime.now().strftime('%Y-%m-%d')}"
# If index_arg was used for name, clear it so it doesn't trigger index logic
if index_arg:
index_arg = None
@@ -1193,12 +1197,9 @@ def _run(result: Any, args: Sequence[str], config: Dict[str, Any]) -> int:
ctx.set_last_result_table_overlay(table, [p['items'] for p in playlists])
ctx.set_current_stage_table(table)
# In pipeline mode, the CLI renders current-stage tables; printing here duplicates output.
suppress_direct_print = bool(isinstance(config, dict) and config.get("_quiet_background_output"))
if not suppress_direct_print:
from rich_display import stdout_console
stdout_console().print(table)
# Do not print directly here.
# Both CmdletExecutor and PipelineExecutor render the current-stage/overlay table,
# so printing here would duplicate output.
return 0
# Everything below was originally outside a try block; keep it inside so `start_opts` is in scope.
@@ -1513,12 +1514,9 @@ def _run(result: Any, args: Sequence[str], config: Dict[str, Any]) -> int:
ctx.set_last_result_table_overlay(table, pipe_objects)
ctx.set_current_stage_table(table)
# In pipeline mode, the CLI renders current-stage tables; printing here duplicates output.
suppress_direct_print = bool(isinstance(config, dict) and config.get("_quiet_background_output"))
if not suppress_direct_print:
from rich_display import stdout_console
stdout_console().print(table)
# Do not print directly here.
# Both CmdletExecutor and PipelineExecutor render the current-stage/overlay table,
# so printing here would duplicate output.
return 0
finally: