Skip to content

Commit 39b8e3b

Browse files
author
Steven Silvester
authored
Merge pull request #51 from jtpio/get-version
Handle missing version from package.json in `get_version`
2 parents 28db9ca + 7e8ef79 commit 39b8e3b

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)