Skip to content

Commit

Permalink
build: fix node build failures in WSL Ubuntu
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
MrJithil authored and danielleadams committed Feb 1, 2022
1 parent a59ade6 commit 3e4d977
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -2043,8 +2043,8 @@ def make_bin_override():
if bin_override is not None:
gyp_args += ['-Dpython=' + sys.executable]

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

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

0 comments on commit 3e4d977

Please sign in to comment.