Skip to content

Commit b360d15

Browse files
martenrichterpre-commit-ci[bot]krassowski
authored
Check for npm error code 409 to skip previously published packages in private registries (#605)
* Use npm error code 409 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Michał Krassowski <[email protected]>
1 parent 7a002f8 commit b360d15

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

jupyter_releaser/lib.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,11 @@ def publish_assets(
450450
util.run(f"{npm_cmd} {name}", cwd=dist_dir, quiet=True, quiet_error=True, echo=True)
451451
except CalledProcessError as e:
452452
stderr = e.stderr
453-
if "EPUBLISHCONFLICT" in stderr or "previously published versions" in stderr:
453+
if (
454+
"E409" in stderr
455+
or "EPUBLISHCONFLICT" in stderr
456+
or "previously published versions" in stderr
457+
):
454458
continue
455459
util.log(stderr)
456460
raise e

0 commit comments

Comments
 (0)