particle-iot / particle-cli

Command Line Interface for Particle Cloud and devices
Apache License 2.0
212 stars 92 forks source link

Validate file used with enable-device-protection #750

Closed keeramis closed 2 months ago

keeramis commented 2 months ago

Description

This PR checks if the file provided to the particle binary enable-device-protection supports Device Protection. If not, error is thrown.

How to Test

particle binary enable-device-protection /path/to/bootloader-6.0.0.bin -> works particle binary enable-device-protection /path/to/pre-bootloader-6.0.0.bin -> errors particle binary enable-device-protection /path/to/bootloader-5.8.0.bin -> errors particle binary enable-device-protection /path/to/system-part-6.0.0.bin -> errors

Related Issues / Discussions

NA

Completeness