mirror of
https://github.com/MrUnknownDE/OpenIris-ESPIDF.git
synced 2026-05-01 20:13:44 +02:00
Fix dry-run truncating the main config file
This commit is contained in:
@@ -64,7 +64,7 @@ print(f"{OKGREEN}Switching configuration to board:{ENDC} {OKBLUE}{args.board}{EN
|
|||||||
print(f"{OKGREEN}Using defaults from :{ENDC} {get_base_config_path()}", )
|
print(f"{OKGREEN}Using defaults from :{ENDC} {get_base_config_path()}", )
|
||||||
print(f"{OKGREEN}Using board config from :{ENDC} {get_board_config_path()}")
|
print(f"{OKGREEN}Using board config from :{ENDC} {get_board_config_path()}")
|
||||||
|
|
||||||
main_config = open(get_main_config_path(), "w+")
|
main_config = open(get_main_config_path(), "a+")
|
||||||
base_config = open(get_base_config_path(), "r")
|
base_config = open(get_base_config_path(), "r")
|
||||||
board_config = open(get_board_config_path(), "r")
|
board_config = open(get_board_config_path(), "r")
|
||||||
|
|
||||||
@@ -88,6 +88,7 @@ if not args.dry_run:
|
|||||||
# This way we can have known working defaults safe from accidental modifications by espidf
|
# This way we can have known working defaults safe from accidental modifications by espidf
|
||||||
# with know working per-board config
|
# with know working per-board config
|
||||||
# and a still modifiable sdkconfig for espidf
|
# and a still modifiable sdkconfig for espidf
|
||||||
|
main_config.truncate(0)
|
||||||
for key in parsed_board_config:
|
for key in parsed_board_config:
|
||||||
parsed_base_config[key] = parsed_board_config[key]
|
parsed_base_config[key] = parsed_board_config[key]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user