From 7f7e093943b56b28ef85a33364df7b2299942ec0 Mon Sep 17 00:00:00 2001 From: Uyanide Date: Mon, 9 Mar 2026 01:22:17 +0100 Subject: [PATCH] fix --- config/scripts/.local/scripts/xgo | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config/scripts/.local/scripts/xgo b/config/scripts/.local/scripts/xgo index df69b81..3841953 100755 --- a/config/scripts/.local/scripts/xgo +++ b/config/scripts/.local/scripts/xgo @@ -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())