diff options
author | Harmen Stoppels <harmenstoppels@gmail.com> | 2022-03-09 14:13:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-09 13:13:37 +0000 |
commit | 3df90e3e33dd9857a8d9bdd206a8a1ed2fd82675 (patch) | |
tree | 9cb18aea3743d115dd47ade5b37cc3a2c802d549 /lib/spack | |
parent | 89e2ee70e23bd6217f1507b274d93de721d4dc97 (diff) | |
download | spack-3df90e3e33dd9857a8d9bdd206a8a1ed2fd82675.tar.gz spack-3df90e3e33dd9857a8d9bdd206a8a1ed2fd82675.tar.bz2 spack-3df90e3e33dd9857a8d9bdd206a8a1ed2fd82675.tar.xz spack-3df90e3e33dd9857a8d9bdd206a8a1ed2fd82675.zip |
ci.py: fix utf-8 issue with git log output (#29419)
Diffstat (limited to 'lib/spack')
-rw-r--r-- | lib/spack/spack/cmd/ci.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/spack/spack/cmd/ci.py b/lib/spack/spack/cmd/ci.py index 44e751e38f..4963f63c5e 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 |