Browse Source

Fix encoding of the .gitignore file on Windows (#2797)

Carlos Llatser 1 year ago
parent
commit
2125701c2d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      reflex/utils/prerequisites.py

+ 1 - 1
reflex/utils/prerequisites.py

@@ -338,7 +338,7 @@ def initialize_gitignore():
             files |= set([line.strip() for line in f.readlines()])
 
     # 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}")
         f.write(f"{(path_ops.join(sorted(files))).lstrip()}")