diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-01-27 16:04:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-01-27 16:04:10 +0000 |
commit | a971f38b11f5955f6ea4f7922233d8324a5c6753 (patch) | |
tree | 5a424740e9cee97bc1c8053fea07db935c27b659 /pre_commit/languages/dotnet.py | |
parent | Adding upstream version 2.8.2. (diff) | |
download | pre-commit-a971f38b11f5955f6ea4f7922233d8324a5c6753.tar.xz pre-commit-a971f38b11f5955f6ea4f7922233d8324a5c6753.zip |
Adding upstream version 2.9.3.upstream/2.9.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'pre_commit/languages/dotnet.py')
-rw-r--r-- | pre_commit/languages/dotnet.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/pre_commit/languages/dotnet.py b/pre_commit/languages/dotnet.py index a8abc86..094d2f1 100644 --- a/pre_commit/languages/dotnet.py +++ b/pre_commit/languages/dotnet.py @@ -12,7 +12,6 @@ from pre_commit.hook import Hook 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' @@ -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( |