Skip to content

Commit

Permalink
Merge pull request #18 from bluesliverx/main
Browse files Browse the repository at this point in the history
Fix filename of the copied pre commit config
  • Loading branch information
bluesliverx authored Dec 18, 2023
2 parents 876445a + 508a4f5 commit ce2e02b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pydc_control/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
import time
from typing import Dict, List, Optional, Union

from pre_commit.constants import CONFIG_FILE as PRE_COMMIT_CONFIG_FILE

from . import config, docker_compose_utils, docker_utils, log
from .data import Project, Service
from .exceptions import KnownException
Expand Down Expand Up @@ -266,7 +268,7 @@ def _handle_pre_commit(project: Project) -> None:
pre_commit_file_name = os.path.basename(pre_commit_config_path)
shutil.copy(
pre_commit_config_path,
os.path.join(project.path, pre_commit_file_name),
os.path.join(project.path, PRE_COMMIT_CONFIG_FILE),
)
subprocess.call(['git', 'add', pre_commit_file_name], cwd=project.path)
exit_code = subprocess.call(['pre-commit', 'install'], cwd=project.path)
Expand Down

0 comments on commit ce2e02b

Please sign in to comment.