Might be redundant, but if the JSON file given to --config contains a list it will break the .split(), but if --harddrives is given as an argument, then we need to split. So adding a type-check

This commit is contained in:
Anton Hvornum 2021-09-15 19:09:57 +02:00
parent d6acfec799
commit 1a7056efc4
1 changed files with 3 additions and 1 deletions

View File

@ -29,7 +29,9 @@ archinstall.log(f"Disk states before installing: {archinstall.disk_layouts()}",
def load_config():
if archinstall.arguments.get('harddrives', None) is not None:
archinstall.arguments['harddrives'] = [archinstall.BlockDevice(BlockDev) for BlockDev in archinstall.arguments['harddrives'].split(',')]
if type(archinstall.arguments['harddrives']) is str:
archinstall.arguments['harddrives'] = archinstall.arguments['harddrives'].split(',')
archinstall.arguments['harddrives'] = [archinstall.BlockDevice(BlockDev) for BlockDev in archinstall.arguments['harddrives']]
# Temporarily disabling keep_partitions if config file is loaded
# Temporary workaround to make Desktop Environments work
if archinstall.arguments.get('profile', None) is not None: