diff --git a/jupyter_releaser/npm.py b/jupyter_releaser/npm.py index 2ac7302a..cdf2fb0f 100644 --- a/jupyter_releaser/npm.py +++ b/jupyter_releaser/npm.py @@ -47,8 +47,12 @@ def build_dist(package, dist_dir): if data.get("private", False): continue paths.append(str(osp.abspath(path)).replace(os.sep, "/")) - - util.run(f"npm pack {' '.join(paths)}", cwd=dest, quiet=True) + if paths: + util.run(f"npm pack {' '.join(paths)}", cwd=dest, quiet=True) + else: + util.log( + "The NPM package defines 'workspaces' that does not contain any public package; this may be a mistake." + ) def extract_dist(dist_dir, target):