Skip to content

Commit 7033e6a

Browse files
diegozhulukekarrys
authored andcommitted
fix: build.js remove comments issue
some user may use git Windows-style line-ending which will result in JSON.parse error.
1 parent 4a50fe3 commit 7033e6a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/build.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ async function build (gyp, argv) {
5252
}
5353
}
5454

55-
config = JSON.parse(data.replace(/#.+\n/, ''))
55+
config = JSON.parse(data.replace(/#.+\r?\n/, ''))
5656

5757
// get the 'arch', 'buildType', and 'nodeDir' vars from the config
5858
buildType = config.target_defaults.default_configuration

0 commit comments

Comments
 (0)