qmk / qmk_firmware

Open-source keyboard firmware for Atmel AVR and Arm USB families
https://qmk.fm
GNU General Public License v2.0
18.35k stars 39.53k forks source link

[Bug] `qmk flash` doesn't honor the `-n` flag #22781

Open itaranto opened 11 months ago

itaranto commented 11 months ago

Describe the Bug

I did qmk flash -n -kb <my_keyboard> file.hex and qmk flashed the firmware anyway.

Additional Context?

OS: Arch Linux. Version: 9874d78da30997023fc07d4c057a7dc4a3ba24dc

SubWorkGit commented 2 months ago

After reviewing the flash.py code, I found that the -n flag wasn’t being checked before flashing binary files. I fixed this by adding a check for cli.args.dry_run before calling _flash_binary(). Now, when using the -n flag, the process simulates flashing without actually performing it.

Let me know if you'd like more details or if I should submit a PR!

0910