Fix encoding of the .gitignore file on Windows (#2797)
This commit is contained in:
parent
1b207eb444
commit
2125701c2d
@ -338,7 +338,7 @@ def initialize_gitignore():
|
|||||||
files |= set([line.strip() for line in f.readlines()])
|
files |= set([line.strip() for line in f.readlines()])
|
||||||
|
|
||||||
# Write files to the .gitignore file.
|
# Write files to the .gitignore file.
|
||||||
with open(constants.GitIgnore.FILE, "w") as f:
|
with open(constants.GitIgnore.FILE, "w", newline="\n") as f:
|
||||||
console.debug(f"Creating {constants.GitIgnore.FILE}")
|
console.debug(f"Creating {constants.GitIgnore.FILE}")
|
||||||
f.write(f"{(path_ops.join(sorted(files))).lstrip()}")
|
f.write(f"{(path_ops.join(sorted(files))).lstrip()}")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user