build: decode error output as utf8 (#30093)

This commit is contained in:
Jeremy Rose 2021-07-12 15:22:26 -07:00 committed by GitHub
parent e26901aba4
commit 96ff8d7bd7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,5 +16,5 @@ try:
subprocess.check_output(args, stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as e:
error_msg = "NPM script '{}' failed with code '{}':\n".format(sys.argv[2], e.returncode)
print(error_msg + e.output.decode('ascii'))
print(error_msg + e.output.decode('utf8'))
sys.exit(e.returncode)