Skip to content

Commit 8a02069

Browse files
authored
Merge pull request #143 from fosslight/develop2
Modify to find VCS root path
2 parents 8ed1053 + 585796e commit 8a02069

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/fosslight_prechecker/_precheck.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ def exclude_untracked_files(path):
4848
logger.warning(f"Error to get git untracked files : {ex}")
4949

5050

51-
def exclude_gitignore_files(current_path, path):
51+
def exclude_gitignore_files(path):
5252
global DEFAULT_EXCLUDE_EXTENSION_FILES
5353
try:
54-
root_path = VCSStrategyGit.find_root(current_path)
54+
root_path = VCSStrategyGit.find_root(os.getcwd())
5555
if root_path:
5656
if os.path.isfile(os.path.join(root_path, '.gitignore')):
5757
cmd_result = subprocess.check_output(['git',
@@ -78,7 +78,7 @@ def exclude_git_related_files(path):
7878
# Exclude untracked files
7979
exclude_untracked_files(path)
8080
# Exclude ignore files
81-
exclude_gitignore_files(current_path, path)
81+
exclude_gitignore_files(path)
8282

8383
# Restore path
8484
os.chdir(current_path)

0 commit comments

Comments
 (0)