Skip to content

Commit 40c7926

Browse files
lovellmhdawson
authored andcommitted
build: ensure paths with spaces can be used
Ensure include path is relative to process working directory (PWD) This allows the use of parent paths that contain whitespace, plus keeps the approach consistent with that used by nan. (The previous approach of adding double quotes did not work as intended due to node-gyp removing these on the way through.) PR-URL: #757 Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Nicola Del Gobbo <[email protected]>
1 parent ef16dfb commit 40c7926

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
const path = require('path');
22

3+
const include = path.relative('.', __dirname);
4+
35
module.exports = {
4-
include: `"${__dirname}"`,
5-
gyp: path.join(__dirname, 'node_api.gyp:nothing'),
6+
include: include,
7+
gyp: path.join(include, 'node_api.gyp:nothing'),
68
isNodeApiBuiltin: true,
79
needsFlag: false
810
};

0 commit comments

Comments
 (0)