Skip to content

Commit 44257cf

Browse files
committed
Merge branch 'mr/cardao/fix-NPMLink-split' into 'master'
Fix e3.npm.NPMLink name rsplit See merge request it/e3-core!132
2 parents 17683f1 + 8d4dd0f commit 44257cf

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/e3/npm.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@ def __init__(
2828
This field contains the metadata as returned by
2929
https://registry.npmjs.org/<YOUR PACKAGE>/<YOUR PACKAGE VERSION>.
3030
"""
31-
pkg_scope, pkg_name = name.rsplit("/", 1)
31+
tmp = name.rsplit("/", 1)
32+
if len(tmp) == 2:
33+
pkg_scope, pkg_name = tmp
34+
else:
35+
pkg_name = tmp[0]
36+
pkg_scope = ""
3237

3338
self.name = name
3439
self.filename = f"{pkg_name}-{version}.tgz"

0 commit comments

Comments
 (0)