0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-21 21:19:50 +01:00

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: https://github.com/nodejs/node/issues/41459

PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
MrJithil 2022-01-11 14:42:05 +05:30 committed by Michael Dawson
parent aaa4306a81
commit 2ea2621ace

View File

@ -2031,8 +2031,8 @@ if options.compile_commands_json:
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')