Skip to content

Commit 3e4d977

Browse files
MrJithildanielleadams
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 <anna@addaleax.net> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
1 parent a59ade6 commit 3e4d977

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
@@ -2043,8 +2043,8 @@ def make_bin_override():
20432043
if bin_override is not None:
20442044
gyp_args += ['-Dpython=' + sys.executable]
20452045

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

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

0 commit comments

Comments
 (0)