Skip to content

Commit

Permalink
Add comment to clarify timestamp processing
Browse files Browse the repository at this point in the history
Co-authored-by: Tyler D <tdurk93@gmail.com>
  • Loading branch information
kevin-orlando and tdurk93 authored Jan 31, 2024
1 parent a1078de commit fdead7c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions secureli/abstractions/pre_commit.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def install(self, folder_path: Path) -> InstallResult:
backup_hook_path: str = None

if pre_commit_hook.is_file():
# strip out certain chars from the ISO8601 timestamp for inclusion in file name
timestamp = re.sub(r"[.:-]+", "", datetime.datetime.now().isoformat())
backup_hook_path = f"{pre_commit_hook}.backup.{timestamp}"
shutil.copy2(
Expand Down

0 comments on commit fdead7c

Please sign in to comment.