Skip to content

Commit e9d46ee

Browse files
MrJithilthedull
authored andcommitted
build: fix node build failures in WSL Ubuntu
On WSL systems, `./configure` causes appending of carriage return (`\r\r`) as leftover and will be appended to the `gyp_args`. Therefore, it will lead to unhandled exceptions from the `./configure` execution. Excluded the empty or whitespace item from the `args` array to fix the issue. Fixes: nodejs#41459 PR-URL: nodejs#41476 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent a3455fd commit e9d46ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

configure.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2031,8 +2031,8 @@ def make_bin_override():
20312031
if bin_override is not None:
20322032
gyp_args += ['-Dpython=' + sys.executable]
20332033

2034-
# pass the leftover positional arguments to GYP
2035-
gyp_args += args
2034+
# pass the leftover non-whitespace positional arguments to GYP
2035+
gyp_args += [arg for arg in args if not str.isspace(arg)]
20362036

20372037
if warn.warned and not options.verbose:
20382038
warn('warnings were emitted in the configure phase')

0 commit comments

Comments
 (0)