Skip to content

Commit b0bf2da

Browse files
committed
Make search fore simvue.toml file in parent directories stop at root
1 parent d7fdcdb commit b0bf2da

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

simvue/utilities.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ def find_first_instance_of_file(
5353
_user_file = _current_path.joinpath(file_name)
5454
if _user_file.exists():
5555
return _user_file
56-
_current_path = _current_path.parent
56+
_parent_path = _current_path.parent
57+
if _parent_path == _current_path: # parent of root dir is root dir
58+
break
59+
_current_path = _parent_path
5760

5861
# If the user is running on different mounted volume or outside
5962
# of their user space then the above will not return the file

0 commit comments

Comments
 (0)