Skip to content

Commit a1e7c01

Browse files
davejtombruijn
authored andcommitted
fix: failure when build directory contains spaces
Fix an installation issue that occurs when a path in which node-gyp is run contains spaces. For a path like `my app`, it would error with this message: ``` clang: error: no such file or directory: 'app/node_modules/node-addon-api' ``` The "my" part before the space (and the rest of the path before it) would be missing from the path in the error message. Fixes nodejs/node-gyp#65
1 parent d2dfe4e commit a1e7c01

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pylib/gyp/generator/make.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1418,7 +1418,12 @@ def WriteSources(
14181418
includes = config.get("include_dirs")
14191419
if includes:
14201420
includes = [Sourceify(self.Absolutify(i)) for i in includes]
1421-
self.WriteList(includes, "INCS_%s" % configname, prefix="-I")
1421+
self.WriteList(
1422+
includes,
1423+
"INCS_%s" % configname,
1424+
prefix="-I",
1425+
quoter=EscapeShellArgument
1426+
)
14221427

14231428
compilable = list(filter(Compilable, sources))
14241429
objs = [self.Objectify(self.Absolutify(Target(c))) for c in compilable]

0 commit comments

Comments
 (0)