mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
fix atomic file replace on windows
This commit is contained in:
parent
2e0ee5f5b2
commit
79b098c409
3 changed files with 3 additions and 3 deletions
|
|
@ -165,7 +165,7 @@ def _uninstall_hook_script(hook_type: str) -> None:
|
|||
output.write_line(f'{hook_type} uninstalled')
|
||||
|
||||
if os.path.exists(legacy_path):
|
||||
os.rename(legacy_path, hook_path)
|
||||
os.replace(legacy_path, hook_path)
|
||||
output.write_line(f'Restored previous hooks to {hook_path}')
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue