From b889ab8853289ea9621f5782ce51ba12751d2d09 Mon Sep 17 00:00:00 2001 From: Harry Date: Tue, 27 Jan 2026 15:14:07 +0800 Subject: [PATCH] refactor(download): replace wget with curl for asset and archive downloads --- api/core/sandbox/initializer/app_assets_initializer.py | 2 +- api/core/sandbox/storage/archive_storage.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/core/sandbox/initializer/app_assets_initializer.py b/api/core/sandbox/initializer/app_assets_initializer.py index d7bda14aee..f626933ce0 100644 --- a/api/core/sandbox/initializer/app_assets_initializer.py +++ b/api/core/sandbox/initializer/app_assets_initializer.py @@ -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 diff --git a/api/core/sandbox/storage/archive_storage.py b/api/core/sandbox/storage/archive_storage.py index 4230ca9d2c..1d63d5bbb3 100644 --- a/api/core/sandbox/storage/archive_storage.py +++ b/api/core/sandbox/storage/archive_storage.py @@ -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)