forked from Mirror/pmbootstrap
pmb: use UTF-8 in pmb.helpers.file.replace()
Without this fix, `pmbootstrap pkgrel_bump` does not work with some APKBUILDs with special characters.
This commit is contained in:
parent
614e7f3511
commit
2b062a1272
1 changed files with 2 additions and 2 deletions
|
@ -24,12 +24,12 @@ import pmb.helpers.run
|
|||
|
||||
def replace(path, old, new):
|
||||
text = ""
|
||||
with open(path, 'r') as handle:
|
||||
with open(path, "r", encoding="utf-8") as handle:
|
||||
text = handle.read()
|
||||
|
||||
text = text.replace(old, new)
|
||||
|
||||
with open(path, 'w') as handle:
|
||||
with open(path, "w", encoding="utf-8") as handle:
|
||||
handle.write(text)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue