mirror of
https://git.yoctoproject.org/poky
synced 2026-04-21 03:32:12 +02:00
recipetool: create: fix picking up false npm package directories
It is possible for a Node.js module to have node_modules subdirectories that contain no package.json file (e.g. iotivity-node has such a directory). It appears these should simply be ignored, or else with the way the current code works we will get errors later. (From OE-Core rev: 8c522f1f536270e195c8c73f5c72801495e7b33b) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
de7562620e
commit
6ddd408f6d
@@ -149,7 +149,7 @@ def npm_split_package_dirs(pkgdir):
|
||||
if os.path.exists(pkgfile):
|
||||
with open(pkgfile, 'r') as f:
|
||||
data = json.loads(f.read())
|
||||
packages[pkgname] = (relpth, data)
|
||||
packages[pkgname] = (relpth, data)
|
||||
# We want the main package for a module sorted *after* its subpackages
|
||||
# (so that it doesn't otherwise steal the files for the subpackage), so
|
||||
# this is a cheap way to do that whilst still having an otherwise
|
||||
|
||||
Reference in New Issue
Block a user