f
This commit is contained in:
@@ -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}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user