diff options
author | Myles Borins <mylesborins@google.com> | 2018-05-10 15:21:53 -0400 |
---|---|---|
committer | Myles Borins <mylesborins@google.com> | 2018-06-25 16:02:46 -0400 |
commit | 8b4af64f50c5e41ce0155716f294c24ccdecad03 (patch) | |
tree | 1e384618a674f8b491e743c5168beb6a76f90a67 /deps/npm | |
parent | 95205a61251aca0af3f1c8663caaffb03a5f5c3a (diff) | |
download | node-new-8b4af64f50c5e41ce0155716f294c24ccdecad03.tar.gz |
deps: float fix on node-gyp in npm tree
This is a fix for filenames that have spaces which currently breaks
node-gyp. npm has not yet updated the dependency to the latest version
in the mean time we should land this as a patch
PR-URL: https://github.com/nodejs/node/pull/21448
Refs: https://github.com/nodejs/node-gyp/pull/1436
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Diffstat (limited to 'deps/npm')
-rw-r--r-- | deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py index 64b9dd267b..6fc5d6b563 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py @@ -623,6 +623,9 @@ def Sourceify(path): def QuoteSpaces(s, quote=r'\ '): return s.replace(' ', quote) +def SourceifyAndQuoteSpaces(path): + """Convert a path to its source directory form and quote spaces.""" + return QuoteSpaces(Sourceify(path)) # TODO: Avoid code duplication with _ValidateSourcesForMSVSProject in msvs.py. def _ValidateSourcesForOSX(spec, all_sources): @@ -1945,7 +1948,7 @@ def WriteAutoRegenerationRule(params, root_makefile, makefile_name, "%(makefile_name)s: %(deps)s\n" "\t$(call do_cmd,regen_makefile)\n\n" % { 'makefile_name': makefile_name, - 'deps': ' '.join(map(Sourceify, build_files)), + 'deps': ' '.join(map(SourceifyAndQuoteSpaces, build_files)), 'cmd': gyp.common.EncodePOSIXShellList( [gyp_binary, '-fmake'] + gyp.RegenerateFlags(options) + |