project.py: decode byte output from check_result
When running project.py under Python 3, the output is a byte sequence, and the bazel location gets written to the .bazel_path file as: bazel=b'/usr/local/bin/bazel' This causes launching the project in Eclipse to fail. To prevent this, decode the byte sequence back to a string. Change-Id: Ia0e1c7f1e4f934e245dc85d83a01089034679024
This commit is contained in:
@@ -57,7 +57,7 @@ def retrieve_ext_location():
|
||||
return check_output(['bazel', 'info', 'output_base']).strip()
|
||||
|
||||
def gen_bazel_path():
|
||||
bazel = check_output(['which', 'bazel']).strip()
|
||||
bazel = check_output(['which', 'bazel']).strip().decode('UTF-8')
|
||||
with open(path.join(ROOT, ".bazel_path"), 'w') as fd:
|
||||
fd.write("bazel=%s\n" % bazel)
|
||||
fd.write("PATH=%s\n" % environ["PATH"])
|
||||
|
Reference in New Issue
Block a user