fix(asset_download_service): suppress error output during download command execution

- Updated the download script to redirect error output to /dev/null, preventing unnecessary error messages from being displayed.
- Added an explicit exit command to ensure the script terminates correctly after execution.
This commit is contained in:
Harry
2026-01-23 17:06:11 +08:00
parent 248fa38c34
commit 63ffac6afe

View File

@ -40,7 +40,7 @@ def _render_download_script(root_path: str, download_commands: str) -> str:
url="$2"
dest="${{download_root}}/${{file_path}}"
mkdir -p "$(dirname "${{dest}}")"
eval "${{download_cmd}}" || echo "${{file_path}}" >> "${{fail_log}}"
eval "${{download_cmd}}" 2>/dev/null || echo "${{file_path}}" >> "${{fail_log}}"
}}
{download_commands}
@ -52,6 +52,7 @@ def _render_download_script(root_path: str, download_commands: str) -> str:
else
rm -f "${{fail_log}}"
fi
exit 0
"""
return textwrap.dedent(script).strip()