Skip to content

Commit 409073a

Browse files
committed
Fix Handling of Workspace Packages
1 parent 2f800ad commit 409073a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

jupyter_releaser/npm.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,12 +166,17 @@ def tag_workspace_packages():
166166

167167
data = json.loads(PACKAGE_JSON.read_text(encoding="utf-8"))
168168
tags = util.run("git tag").splitlines()
169-
if not "workspaces" in data:
169+
if "workspaces" not in data:
170170
return
171171

172172
for pattern in _get_workspace_packages(data):
173173
for path in glob(pattern, recursive=True):
174-
sub_package_json = Path(path) / "package.json"
174+
sub_package = Path(path)
175+
if not sub_package.is_dir():
176+
continue
177+
sub_package_json = sub_package / "package.json"
178+
if not sub_package_json.exists():
179+
continue
175180
sub_data = json.loads(sub_package_json.read_text(encoding="utf-8"))
176181
tag_name = f"{sub_data['name']}@{sub_data['version']}"
177182
if tag_name in tags:

0 commit comments

Comments
 (0)