Skip to content

Commit 0e521a2

Browse files
author
Steven Silvester
authored
Merge pull request #39 from blink1073/fix-npm-registry-again
Fix usage of registry value
2 parents 7002d89 + 8d3c4c4 commit 0e521a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jupyter_releaser/npm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@ def handle_npm_config(npm_token):
131131
"""Handle npm_config"""
132132
npmrc = Path(".npmrc")
133133
registry = os.environ.get("NPM_REGISTRY", "https://registry.npmjs.org/")
134-
registry = registry.replace("https:", "")
135-
registry = registry.replace("http:", "")
136134
text = f"registry={registry}"
137135
if npm_token:
136+
registry = registry.replace("https:", "")
137+
registry = registry.replace("http:", "")
138138
text += f"\n{registry}:_authToken={npm_token}"
139139
if npmrc.exists():
140140
text = npmrc.read_text(encoding="utf-8") + text

0 commit comments

Comments
 (0)