diff options
-rw-r--r-- | meta/classes-recipe/npm.bbclass | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/classes-recipe/npm.bbclass b/meta/classes-recipe/npm.bbclass index 91da3295f2..a73ff29be8 100644 --- a/meta/classes-recipe/npm.bbclass +++ b/meta/classes-recipe/npm.bbclass | |||
@@ -72,8 +72,10 @@ def npm_pack(env, srcdir, workdir): | |||
72 | j = json.load(f) | 72 | j = json.load(f) |
73 | 73 | ||
74 | # base does not really matter and is for documentation purposes | 74 | # base does not really matter and is for documentation purposes |
75 | # only. But the 'version' part must exist because other parts of | 75 | # only. But the 'version' part must exist because other parts of |
76 | # the bbclass rely on it. | 76 | # the bbclass rely on it. |
77 | if 'version' not in j: | ||
78 | j['version'] = '0.0.0-unknown' | ||
77 | base = j['name'].split('/')[-1] | 79 | base = j['name'].split('/')[-1] |
78 | tarball = os.path.join(workdir, "%s-%s.tgz" % (base, j['version'])); | 80 | tarball = os.path.join(workdir, "%s-%s.tgz" % (base, j['version'])); |
79 | 81 | ||