summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarmen Stoppels <harmenstoppels@gmail.com>2022-03-09 14:13:37 +0100
committerMassimiliano Culpo <massimiliano.culpo@gmail.com>2022-04-14 11:08:17 +0200
commit9edfd251348860bcfa041bfa28502fa384f3baf6 (patch)
treeb9ec0a612af6d4969b43b70fe04fbf280467ee3b
parentafb3f4ff2021c795c7563ab70321a7cfbd0f0104 (diff)
downloadspack-9edfd251348860bcfa041bfa28502fa384f3baf6.tar.gz
spack-9edfd251348860bcfa041bfa28502fa384f3baf6.tar.bz2
spack-9edfd251348860bcfa041bfa28502fa384f3baf6.tar.xz
spack-9edfd251348860bcfa041bfa28502fa384f3baf6.zip
ci.py: fix utf-8 issue with git log output (#29419)
-rw-r--r--lib/spack/spack/cmd/ci.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/spack/spack/cmd/ci.py b/lib/spack/spack/cmd/ci.py
index b8ed1fb27d..87d29506b4 100644
--- a/lib/spack/spack/cmd/ci.py
+++ b/lib/spack/spack/cmd/ci.py
@@ -362,8 +362,10 @@ def ci_rebuild(args):
# Write information about spack into an artifact in the repro dir
spack_info = spack_ci.get_spack_info()
spack_info_file = os.path.join(repro_dir, 'spack_info.txt')
- with open(spack_info_file, 'w') as fd:
- fd.write('\n{0}\n'.format(spack_info))
+ with open(spack_info_file, 'wb') as fd:
+ fd.write(b'\n')
+ fd.write(spack_info.encode('utf8'))
+ fd.write(b'\n')
# If we decided there should be a temporary storage mechanism, add that
# mirror now so it's used when we check for a full hash match already