mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
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>
This commit is contained in:
1 parent
f5fc412092
commit
a48d98ef04
1 file changed
+4
-1
+4
-1
@@ -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) +
|
||||
|
||||
Reference in new issue
Block a user