Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMrJithil <jithil@outlook.com>2022-01-11 12:12:05 +0300
committerMichael Dawson <mdawson@devrus.com>2022-01-15 02:08:58 +0300
commit2ea2621ace40921e1bfa56ad0d9a3be0011de738 (patch)
treefc304b9d11c26a5b43f92c752c909d9f2b2491a6 /configure.py
parentaaa4306a81a388cef1090d5f058a65fb75c64518 (diff)
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>
Diffstat (limited to 'configure.py')
-rwxr-xr-xconfigure.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/configure.py b/configure.py
index 3209c5a6472..c17e3c6dfaa 100755
--- a/configure.py
+++ b/configure.py
@@ -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')