Commit b30e223
fix: clean up errors, exit codes, and ls directory display
- Remove leftover debug print("here we are") from reset command
- reset --safe/--bootloader now exits 1 when unsupported on MicroPython
- run with a missing local file now exits 1 instead of silently succeeding
- Add AmypGroup (custom Click Group) to catch RuntimeError and
DirectoryExistsError at the top level — users see a clean "Error: ..."
message instead of a raw Python traceback
- Fix rm error handling: conditions used != 1 instead of != -1, and
ENOTEMPTY was checked as errno 13 (wrong) instead of 39; now parses
the errno number from the OSError message for accurate messages
- ls -l and ls -r -l now show "<dir>" for directories instead of a
meaningless block-size byte count from MicroPython's os.stat
- Add import re to files.py (needed by the new errno parsing)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent bac4f5a commit b30e223
2 files changed
Lines changed: 39 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
45 | 60 | | |
46 | 61 | | |
47 | 62 | | |
| |||
55 | 70 | | |
56 | 71 | | |
57 | 72 | | |
58 | | - | |
| 73 | + | |
59 | 74 | | |
60 | 75 | | |
61 | 76 | | |
| |||
357 | 372 | | |
358 | 373 | | |
359 | 374 | | |
| 375 | + | |
360 | 376 | | |
361 | 377 | | |
362 | 378 | | |
| |||
417 | 433 | | |
418 | 434 | | |
419 | 435 | | |
420 | | - | |
421 | 436 | | |
422 | | - | |
423 | | - | |
| 437 | + | |
| 438 | + | |
424 | 439 | | |
425 | 440 | | |
426 | 441 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
153 | 154 | | |
154 | 155 | | |
155 | 156 | | |
156 | | - | |
157 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
158 | 162 | | |
159 | 163 | | |
160 | 164 | | |
| |||
243 | 247 | | |
244 | 248 | | |
245 | 249 | | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
255 | 264 | | |
256 | 265 | | |
257 | 266 | | |
| |||
0 commit comments