Skip to content

Commit

Permalink
fix: fixed bug that stopped new configs being updated when CONFIG_ va…
Browse files Browse the repository at this point in the history
…lues changed
  • Loading branch information
Johnny-Knighten committed Nov 30, 2023
1 parent 6e92fdf commit be8e4e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config_from_env_vars/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def backup_existing_ini_files(path: str) -> None:

try:
logging.info(f"Creating backup of {file_path} to {backup_path}")
shutil.copyfile(file_path, backup_path)
shutil.move(file_path, backup_path)
except Exception as e:
logging.error(f"Error creating backup of {file_name}: {e}")
continue
Expand All @@ -110,7 +110,7 @@ def get_latest_backup_file(base_file_path: str):
def compare_and_cleanup_configs(path: str):
for file in Path(path).glob("*.ini"):
latest_backup = get_latest_backup_file(str(file))

if not latest_backup:
logging.info(f"No backups exist for: {file}")
continue
Expand Down

0 comments on commit be8e4e3

Please sign in to comment.