After the do_fetch task, every other tasks must not access the network.
In order to ensure this point every npm command must use the offline
configuration. In addition setting an invalid proxy is used as a safety.
Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
def npm_global_configs(d):
"""Get the npm global configuration"""
configs = []
+ # Ensure no network access is done
+ configs.append(("offline", "true"))
+ configs.append(("proxy", "http://invalid"))
# Configure the cache directory
configs.append(("cache", d.getVar("NPM_CACHE")))
return configs