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 GitHub
parent a6779061d7
commit 712fc696ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)