Skip to content

Commit

Permalink
feat(tools): handle symlinks correctly for take command
Browse files Browse the repository at this point in the history
  • Loading branch information
Segaja committed Nov 16, 2023
1 parent c863d24 commit 4f405b1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions nvchecker/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import sys
import argparse
import shutil
import structlog
import json

Expand Down Expand Up @@ -60,9 +61,7 @@ def take() -> None:
sys.exit(2)

try:
oldverf.rename(
oldverf.with_name(oldverf.name + '~'),
)
shutil.copy(oldverf, oldverf.with_name(oldverf.name + '~'))
except FileNotFoundError:
pass
core.write_verfile(oldverf, oldvers)
Expand Down

0 comments on commit 4f405b1

Please sign in to comment.