mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-15 18:11:48 +04:00
Check temp_env.yml existence before deleting
This commit is contained in:
parent
6ee227326c
commit
a2ca862130
1 changed files with 2 additions and 1 deletions
|
|
@ -80,7 +80,8 @@ def install_environment(
|
||||||
tmp_env_file.name, cwd=prefix.prefix_dir,
|
tmp_env_file.name, cwd=prefix.prefix_dir,
|
||||||
)
|
)
|
||||||
finally:
|
finally:
|
||||||
os.remove(tmp_env_file.name)
|
if os.path.exists(tmp_env_file.name):
|
||||||
|
os.remove(tmp_env_file.name)
|
||||||
|
|
||||||
|
|
||||||
def run_hook(
|
def run_hook(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue