Skip to content

Commit e8d859d

Browse files
committed
Don't load index when it is ignored
1 parent 9b23d0c commit e8d859d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

easybuild/tools/filetools.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,8 +1000,11 @@ def search_file(paths, query, short=False, ignore_dirs=None, silent=False, filen
10001000
if not terse:
10011001
print_msg("Searching (case-insensitive) for '%s' in %s " % (query.pattern, path), log=_log, silent=silent)
10021002

1003-
path_index = load_index(path, ignore_dirs=ignore_dirs)
1004-
if path_index is None or build_option('ignore_index'):
1003+
if build_option('ignore_index'):
1004+
path_index = None
1005+
else:
1006+
path_index = load_index(path, ignore_dirs=ignore_dirs)
1007+
if path_index is None:
10051008
if os.path.exists(path):
10061009
_log.info("No index found for %s, creating one...", path)
10071010
path_index = create_index(path, ignore_dirs=ignore_dirs)

0 commit comments

Comments
 (0)