Skip to content

Commit e8538c3

Browse files
MrJithiltargos
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: #41459 PR-URL: #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 f5b8aee commit e8538c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

configure.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2030,8 +2030,8 @@ def make_bin_override():
20302030
if bin_override is not None:
20312031
gyp_args += ['-Dpython=' + sys.executable]
20322032

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

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

0 commit comments

Comments
 (0)