mirror of
https://github.com/langgenius/dify.git
synced 2026-02-22 19:15:47 +08:00
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:
@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user