npm: use mkdirp instead of mkdir (#16835)

fixes #16833

Co-authored-by: Marc Allen <mrcall@amazon.com>
This commit is contained in:
Marc Allen 2020-05-28 04:33:09 -06:00 committed by Gregory Becker
parent a69674c73e
commit 322a12e801

View File

@ -54,11 +54,11 @@ def install(self, spec, prefix):
def setup_dependent_build_environment(self, env, dependent_spec):
npm_config_cache_dir = "%s/npm-cache" % dependent_spec.prefix
if not os.path.isdir(npm_config_cache_dir):
mkdir(npm_config_cache_dir)
mkdirp(npm_config_cache_dir)
env.set('npm_config_cache', npm_config_cache_dir)
def setup_dependent_run_environment(self, env, dependent_spec):
npm_config_cache_dir = "%s/npm-cache" % dependent_spec.prefix
if not os.path.isdir(npm_config_cache_dir):
mkdir(npm_config_cache_dir)
mkdirp(npm_config_cache_dir)
env.set('npm_config_cache', npm_config_cache_dir)