Skip safety check if upgrading
This commit is contained in:
parent
d33f78960d
commit
0883b099fd
1 changed files with 13 additions and 16 deletions
|
|
@ -82,32 +82,29 @@ if __name__ == '__main__':
|
||||||
result = run_program(cmd, check=False, encoding='utf-8', errors='ignore')
|
result = run_program(cmd, check=False, encoding='utf-8', errors='ignore')
|
||||||
for line in result.stdout.splitlines()[1:]:
|
for line in result.stdout.splitlines()[1:]:
|
||||||
print_standard(line)
|
print_standard(line)
|
||||||
if args['--use-mbr'] and not args['--update']:
|
if args['--update']:
|
||||||
|
print_warning('Updating kit in-place')
|
||||||
|
elif args['--use-mbr']:
|
||||||
print_warning('Formatting using legacy MBR')
|
print_warning('Formatting using legacy MBR')
|
||||||
print_standard(' ')
|
print_standard(' ')
|
||||||
if not ask('Is the above information correct?'):
|
if not ask('Is the above information correct?'):
|
||||||
abort()
|
abort()
|
||||||
## Safety check
|
## Safety check
|
||||||
print_standard(' ')
|
if not args['--update']:
|
||||||
print_warning('SAFETY CHECK')
|
print_standard(' ')
|
||||||
print_standard(
|
print_warning('SAFETY CHECK')
|
||||||
'All data will be DELETED from the disk and partition(s) listed above.')
|
print_standard(
|
||||||
print_standard(
|
'All data will be DELETED from the disk and partition(s) listed above.')
|
||||||
'This is irreversible and will lead to {RED}DATA LOSS.{CLEAR}'.format(
|
print_standard(
|
||||||
**COLORS))
|
'This is irreversible and will lead to {RED}DATA LOSS.{CLEAR}'.format(
|
||||||
if not ask('Asking again to confirm, is this correct?'):
|
**COLORS))
|
||||||
abort()
|
if not ask('Asking again to confirm, is this correct?'):
|
||||||
|
abort()
|
||||||
|
|
||||||
print_standard(' ')
|
print_standard(' ')
|
||||||
print_success("It's go-time!")
|
print_success("It's go-time!")
|
||||||
exit_script(1)
|
exit_script(1)
|
||||||
|
|
||||||
# TODO FIXME
|
|
||||||
print_standard('UFD: {}'.format(ufd_dev))
|
|
||||||
print_standard('Sources:')
|
|
||||||
for label, s_path in sources.items():
|
|
||||||
print_standard(' {:<16} {}'.format(label+':', s_path))
|
|
||||||
|
|
||||||
# Double-check if formating device
|
# Double-check if formating device
|
||||||
|
|
||||||
# Format and partition device
|
# Format and partition device
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue