From f1ed3157387c7968ba5b15ec12774bb8870e4492 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Thu, 28 Nov 2024 14:05:56 +0100 Subject: [PATCH] Set the used npm registry --- tag_publish/publish.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tag_publish/publish.py b/tag_publish/publish.py index a8af249..9bc2ad9 100644 --- a/tag_publish/publish.py +++ b/tag_publish/publish.py @@ -146,9 +146,9 @@ def node( old_npmrc = open_file.read() with open(npmrc_filename, "w", encoding="utf-8") as open_file: open_file.write(f"//npm.pkg.github.com/:_authToken={os.environ['GITHUB_TOKEN']}\n") - open_file.write(f"registry=https://{repo_config['host']}\n") open_file.write("always-auth=true\n") + subprocess.run(["npm", "set", "registry", f'https://{repo_config["host"]}'], cwd=cwd, check=True) subprocess.run(["npm", "publish", *([] if publish else ["--dry-run"]), *args], cwd=cwd, check=True) if is_github: