mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 10:28:10 +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"
|
url="$2"
|
||||||
dest="${{download_root}}/${{file_path}}"
|
dest="${{download_root}}/${{file_path}}"
|
||||||
mkdir -p "$(dirname "${{dest}}")"
|
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}
|
{download_commands}
|
||||||
@ -52,6 +52,7 @@ def _render_download_script(root_path: str, download_commands: str) -> str:
|
|||||||
else
|
else
|
||||||
rm -f "${{fail_log}}"
|
rm -f "${{fail_log}}"
|
||||||
fi
|
fi
|
||||||
|
exit 0
|
||||||
"""
|
"""
|
||||||
return textwrap.dedent(script).strip()
|
return textwrap.dedent(script).strip()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user