🔨 PowerShell compatibility (#27720)

This commit is contained in:
Andrew
2025-03-17 19:04:59 -04:00
committed by GitHub
parent 0d87dd9d51
commit 2f4f2bce15
8 changed files with 23 additions and 23 deletions
+2 -2
View File
@@ -71,7 +71,7 @@ def format_pins(argv):
file_text = sys.stdin.read()
else:
# Open and read the file src_file
with open(src_file, 'r') as rf: file_text = rf.read()
with open(src_file, 'r', encoding='utf-8') as rf: file_text = rf.read()
if len(file_text) == 0:
print('No text to process')
@@ -80,7 +80,7 @@ def format_pins(argv):
# Read from file or STDIN until it terminates
filtered = process_text(file_text)
if dst_file:
with open(dst_file, 'w') as wf: wf.write(filtered)
with open(dst_file, 'w', encoding='utf-8') as wf: wf.write(filtered)
else:
print(filtered)
+2 -2
View File
@@ -40,7 +40,7 @@ def boards_checks(argv):
logmsg('Checking boards file:', src_file)
# Open the file
with open(src_file, 'r') as f:
with open(src_file, 'r', encoding='utf-8') as f:
lines = f.readlines()
# Get the board names and numbers
@@ -85,7 +85,7 @@ def boards_checks(argv):
# Validate that pins.h has all the boards mentioned in it
#
pins_boards = []
with open('Marlin/src/pins/pins.h', 'r') as f:
with open('Marlin/src/pins/pins.h', 'r', encoding='utf-8') as f:
lines = f.readlines()
if_count = 0
for line in lines: