diff --git a/agent-node/VERSION b/agent-node/VERSION index af0b7dd..238d6e8 100644 --- a/agent-node/VERSION +++ b/agent-node/VERSION @@ -1 +1 @@ -1.0.6 +1.0.7 diff --git a/agent-node/bootstrap_installer.py b/agent-node/bootstrap_installer.py index 2d6f922..8f1faa9 100644 --- a/agent-node/bootstrap_installer.py +++ b/agent-node/bootstrap_installer.py @@ -76,7 +76,19 @@ _print(f"Extracting to {install_dir} ...") if os.path.exists(install_dir): - shutil.rmtree(install_dir) + try: + # We try to clean up, but ignore errors for read-only mounts (docker) + for item in os.listdir(install_dir): + item_path = os.path.join(install_dir, item) + try: + if os.path.isdir(item_path): + shutil.rmtree(item_path) + else: + os.unlink(item_path) + except Exception: + continue # Skip things we can't delete + except Exception as e: + _print(f" [!] Warning: Could not fully clean install dir: {e}") os.makedirs(install_dir, exist_ok=True) with tarfile.open(tarball, "r:gz") as tar: