Skip to content

Commit 7c7ef83

Browse files
Fixed install.py
1 parent fc5e722 commit 7c7ef83

File tree

4 files changed

+13
-14
lines changed

4 files changed

+13
-14
lines changed

dependencies/pcre2

Submodule pcre2 updated 89 files

install.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,28 +68,27 @@ def ProcessGitSafeDir():
6868

6969
def ProcessGitSubmodules():
7070
dependency_folder = "dependencies"
71-
count = 0
71+
needProceed = True
7272
try:
7373
dependencies = os.listdir(dependency_folder)
7474
count = len(dependencies)
75+
7576
if (count != 0):
76-
for root, dirs, files in os.walk(dependency_folder):
77+
countdownOfEmptyFolder = count
78+
for root, dirs, _ in os.walk(dependency_folder):
7779
for dir in dirs:
78-
count = len(dir)
79-
if count != 0:
80-
break
81-
82-
if count != 0:
83-
break
84-
80+
if len(os.listdir(os.path.join(root, dir))) > 0:
81+
countdownOfEmptyFolder -= 1
82+
83+
needProceed = countdownOfEmptyFolder > 0
8584

8685
except FileNotFoundError:
87-
printError("The folder '{dependency_folder}' does not exist.")
86+
printError(f"The folder '{dependency_folder}' does not exist.")
8887
return False
8988

9089

9190

92-
if count == 0:
91+
if needProceed:
9392
while True:
9493
user_input = input("No dependencies found. Do you want to update git submodules? [Y/n]: ").strip().lower()
9594
if user_input in ["y", "yes", ""]:

0 commit comments

Comments
 (0)