Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix dotnet build cleanup #1678

Merged
merged 1 commit into from Nov 3, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 3 additions & 4 deletions pre_commit/languages/dotnet.py
Expand Up @@ -12,7 +12,6 @@
from pre_commit.languages import helpers
from pre_commit.prefix import Prefix
from pre_commit.util import clean_path_on_failure
from pre_commit.util import rmtree

ENVIRONMENT_DIR = 'dotnetenv'
BIN_DIR = 'bin'
Expand Down Expand Up @@ -76,9 +75,9 @@ def install_environment(
),
)

# Cleanup build output
for d in ('bin', 'obj', build_dir):
rmtree(prefix.path(d))
# Clean the git dir, ignoring the environment dir
clean_cmd = ('git', 'clean', '-ffxd', '-e', f'{ENVIRONMENT_DIR}-*')
helpers.run_setup_cmd(prefix, clean_cmd)


def run_hook(
Expand Down