This commit is contained in:
2026-01-24 23:15:08 -08:00
parent 4eb055bb48
commit 0c336ef1d1
3 changed files with 40 additions and 26 deletions

View File

@@ -1887,18 +1887,26 @@ class Download_File(Cmdlet):
debug(f"Output directory: {final_output_dir}")
progress = PipelineProgress(pipeline_context)
try:
# If we are already in a pipeline stage, the parent UI is already handling progress.
# Calling ensure_local_ui can cause re-initialization hangs on some platforms.
if pipeline_context.get_stage_context() is None:
debug("[download-file] Initializing local UI...")
PipelineProgress(pipeline_context).ensure_local_ui(
progress.ensure_local_ui(
label="download-file",
total_items=len(supported_url),
items_preview=supported_url,
)
else:
debug("[download-file] Skipping local UI: running inside pipeline stage")
try:
progress.begin_pipe(
total_items=len(supported_url),
items_preview=supported_url,
)
except Exception as err:
debug(f"[download-file] PipelineProgress begin_pipe error: {err}")
except Exception as e:
debug(f"[download-file] PipelineProgress update error: {e}")