This commit is contained in:
2026-03-09 01:22:17 +01:00
parent 1698e8388a
commit 7f7e093943
+3 -2
View File
@@ -10,7 +10,6 @@ import sys
import tempfile
import tarfile
import zipfile
import requests
from pathlib import Path
DEFAULT_SHELL = "bash"
@@ -19,6 +18,8 @@ SIZE_PATTERN = re.compile(r"^[1-9][0-9]*[KMGkmg]?$")
def download_to(url: str, dest_dir: Path) -> Path:
# Import when needed
import requests
local_filename = url.split('/')[-1]
dest_path = dest_dir / local_filename
@@ -120,7 +121,7 @@ def main():
parser.add_argument("--no-cleanup", "-n", action="store_true", help="Disable cleanup (unmount and remove dir)")
args = parser.parse_args()
archive = args.archive.resolve()
archive = args.archive.strip()
if archive.suffix in ['https://', 'http://']:
archive = download_to(archive, Path.cwd())