Skip to content

Commit 7e8ef79

Browse files
committed
Handle missing version from package.json
1 parent 28db9ca commit 7e8ef79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jupyter_releaser/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def get_version():
106106
if SETUP_PY.exists():
107107
return run("python setup.py --version")
108108
elif PACKAGE_JSON.exists():
109-
return json.loads(PACKAGE_JSON.read_text(encoding="utf-8"))["version"]
109+
return json.loads(PACKAGE_JSON.read_text(encoding="utf-8")).get("version", "")
110110
else: # pragma: no cover
111111
raise ValueError("No version identifier could be found!")
112112

0 commit comments

Comments
 (0)