8000 Print useful uf2conv error if executable not found (#1141) · uPesy/arduino-pico@4c8bdc2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4c8bdc2

Browse files
Print useful uf2conv error if executable not found (earlephilhower#1141)
Fixes earlephilhower#1140 ```` Converting to uf2, output size: 134144, start address: 0x2000 ERROR: Unable to execute powershell or wmic commands, can't continue. ERROR: Please make sure either PowerShell or WMIC is installed and in your %PATH%. ````
1 parent c58f94a commit 4c8bdc2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/uf2conv.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,10 @@ def get_drives():
240240
"Format-Table -Property DeviceID, DriveType, Filesystem, VolumeName"],
241241
stdin = nul)
242242
nul.close()
243+
except FileNotFoundError:
244+
print("ERROR: Unable to execute powershell or wmic commands, can't continue.")
245+
print("ERROR: Please make sure either PowerShell or WMIC is installed and in your %PATH%.")
246+
sys.exit(1)
243247
except:
244248
print("Unable to build drive list");
245249
sys.exit(1)

0 commit comments

Comments
 (0)
0