Commit 2406e018 authored by rgaudin's avatar rgaudin
Browse files

Added partition number check to CLI

parent 91845fc6
2.0-rc17
* Fixed bug prevent non-sdcard builds via GUI
* Better SD-card partition check dialog
* Added partition number check to CLI
2.0-rc16
* Fixed etcher-cli call on macOS GUI (space escaping)
......
......@@ -27,6 +27,7 @@ from util import get_adjusted_image_size
from backend.catalog import get_catalogs
from run_installation import run_installation
from util import human_readable_size, get_cache
from backend.util import sd_has_single_partition
import tzlocal
import humanfriendly
......@@ -269,6 +270,10 @@ if args.sdcard and not os.path.exists(args.sdcard):
print("SD card device does not exist.")
sys.exit(1)
if args.sdcard and not sd_has_single_partition(args.sdcard, logger):
print("SD card is not clean (must have a single FAT-like partition). Please wipe.")
sys.exit(1)
# display configuration and offer time to cancel
print("Configuration:")
keys = args.__dict__.keys()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment