diff --git a/gyp/pylib/gyp/input.py b/gyp/pylib/gyp/input.py index d9699a0a50..f76e75797e 100644 --- a/gyp/pylib/gyp/input.py +++ b/gyp/pylib/gyp/input.py @@ -967,7 +967,8 @@ def ExpandVariables(input, phase, variables, build_file): stdout=subprocess.PIPE, shell=use_shell, cwd=build_file_dir, - check=False + check=False, + text=True ) except Exception as e: raise GypError( @@ -980,7 +981,7 @@ def ExpandVariables(input, phase, variables, build_file): "Call to '%s' returned exit status %d while in %s." % (contents, result.returncode, build_file) ) - replacement = result.stdout.decode("utf-8").rstrip() + replacement = result.stdout.rstrip() cached_command_results[cache_key] = replacement else: