From f3a1034d5d8092a0ab955ecd4f6077e9e8110152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Thu, 13 Nov 2025 03:59:25 +0100 Subject: [PATCH] fix(release): sanitize package name in stage_npm_packages.py for temp directory creation The script was failing when creating temporary directories for scoped packages like @valknar/llmx because the forward slash in the package name was being used directly in the temp directory prefix, causing Python's tempfile.mkdtemp() to fail with 'No such file or directory'. Fix by sanitizing the package name: replace '/' with '-' and remove '@' before using it in the temp directory prefix. The actual package output file still uses the original package name. Fixes: FileNotFoundError in GitHub Actions rust-release workflow --- scripts/stage_npm_packages.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/stage_npm_packages.py b/scripts/stage_npm_packages.py index 1d8b51d6..e3b416bc 100755 --- a/scripts/stage_npm_packages.py +++ b/scripts/stage_npm_packages.py @@ -148,7 +148,9 @@ def main() -> int: print(f"should `git checkout {resolved_head_sha}`") for package in packages: - staging_dir = Path(tempfile.mkdtemp(prefix=f"npm-stage-{package}-", dir=runner_temp)) + # Sanitize package name for use in filesystem path (replace / with -) + safe_package_name = package.replace("/", "-").replace("@", "") + staging_dir = Path(tempfile.mkdtemp(prefix=f"npm-stage-{safe_package_name}-", dir=runner_temp)) pack_output = output_dir / f"{package}-npm-{args.release_version}.tgz" cmd = [