mirror of https://github.com/langgenius/dify.git
refactor(download): replace wget with curl for asset and archive downloads
This commit is contained in:
parent
394a811e5e
commit
b889ab8853
|
|
@ -30,7 +30,7 @@ class AppAssetsInitializer(AsyncSandboxInitializer):
|
|||
(
|
||||
pipeline(vm)
|
||||
.add(
|
||||
["wget", "-q", download_url, "-O", AppAssets.ZIP_PATH],
|
||||
["curl", "-fsSL", download_url, "-o", AppAssets.ZIP_PATH],
|
||||
error_message="Failed to download assets zip",
|
||||
)
|
||||
# Create the assets directory first to ensure it exists even if zip is empty
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ class ArchiveSandboxStorage(SandboxStorage):
|
|||
try:
|
||||
(
|
||||
pipeline(sandbox)
|
||||
.add(["wget", "-q", download_url, "-O", ARCHIVE_NAME], error_message="Failed to download archive")
|
||||
.add(["curl", "-fsSL", download_url, "-o", ARCHIVE_NAME], error_message="Failed to download archive")
|
||||
.add(["tar", "-xzf", ARCHIVE_NAME], error_message="Failed to extract archive")
|
||||
.add(["rm", ARCHIVE_NAME], error_message="Failed to cleanup archive")
|
||||
.execute(timeout=ARCHIVE_DOWNLOAD_TIMEOUT, raise_on_error=True)
|
||||
|
|
|
|||
Loading…
Reference in New Issue