Prevent rename from deleting new config (#7104)

This commit is contained in:
Alex Cortelyou 2024-07-18 15:04:11 -07:00 committed by GitHub
parent dd20c5eab0
commit b32078a5fe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -695,7 +695,8 @@ def command_rename(args, config):
os.remove(new_path)
return 1
os.remove(CORE.config_path)
if CORE.config_path != new_path:
os.remove(CORE.config_path)
print(color(Fore.BOLD_GREEN, "SUCCESS"))
print()