mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
fix dotnet build cleanup
This commit is contained in:
parent
3fa9d3d758
commit
aa8023407e
1 changed files with 3 additions and 4 deletions
|
|
@ -12,7 +12,6 @@ from pre_commit.hook import Hook
|
||||||
from pre_commit.languages import helpers
|
from pre_commit.languages import helpers
|
||||||
from pre_commit.prefix import Prefix
|
from pre_commit.prefix import Prefix
|
||||||
from pre_commit.util import clean_path_on_failure
|
from pre_commit.util import clean_path_on_failure
|
||||||
from pre_commit.util import rmtree
|
|
||||||
|
|
||||||
ENVIRONMENT_DIR = 'dotnetenv'
|
ENVIRONMENT_DIR = 'dotnetenv'
|
||||||
BIN_DIR = 'bin'
|
BIN_DIR = 'bin'
|
||||||
|
|
@ -76,9 +75,9 @@ def install_environment(
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
# Cleanup build output
|
# Clean the git dir, ignoring the environment dir
|
||||||
for d in ('bin', 'obj', build_dir):
|
clean_cmd = ('git', 'clean', '-ffxd', '-e', f'{ENVIRONMENT_DIR}-*')
|
||||||
rmtree(prefix.path(d))
|
helpers.run_setup_cmd(prefix, clean_cmd)
|
||||||
|
|
||||||
|
|
||||||
def run_hook(
|
def run_hook(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue