diff options
-rw-r--r-- | scripts/lib/recipetool/create.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py index 43c07848c2..1d48e36462 100644 --- a/scripts/lib/recipetool/create.py +++ b/scripts/lib/recipetool/create.py | |||
@@ -355,6 +355,12 @@ def create_recipe(args): | |||
355 | srcuri = rev_re.sub('', srcuri) | 355 | srcuri = rev_re.sub('', srcuri) |
356 | tempsrc = tempfile.mkdtemp(prefix='recipetool-') | 356 | tempsrc = tempfile.mkdtemp(prefix='recipetool-') |
357 | srctree = tempsrc | 357 | srctree = tempsrc |
358 | if fetchuri.startswith('npm://'): | ||
359 | # Check if npm is available | ||
360 | npm = bb.utils.which(tinfoil.config_data.getVar('PATH', True), 'npm') | ||
361 | if not npm: | ||
362 | logger.error('npm:// URL requested but npm is not available - you need to either build nodejs-native or install npm using your package manager') | ||
363 | sys.exit(1) | ||
358 | logger.info('Fetching %s...' % srcuri) | 364 | logger.info('Fetching %s...' % srcuri) |
359 | try: | 365 | try: |
360 | checksums = scriptutils.fetch_uri(tinfoil.config_data, fetchuri, srctree, srcrev) | 366 | checksums = scriptutils.fetch_uri(tinfoil.config_data, fetchuri, srctree, srcrev) |