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: nodejs#41459
  • Loading branch information
MrJithil committed Jan 11, 2022
1 parent f17b73c commit f611dbf
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 @@ -2031,8 +2031,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 f611dbf

Please sign in to comment.