We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3770e73 commit 60da93fCopy full SHA for 60da93f
taskiq/cli/watcher.py
@@ -21,9 +21,17 @@ def __init__(
21
) -> None:
22
self.callback = callback
23
self.gitignore = None
24
- gpath = path / ".gitignore"
25
- if use_gitignore and gpath.exists():
26
- self.gitignore = parse_gitignore(gpath)
+ project_root = Path().resolve()
+ path = path.resolve()
+
27
+ if use_gitignore:
28
+ while path != project_root.parent:
29
+ gpath = path / ".gitignore"
30
+ if gpath.exists():
31
+ self.gitignore = parse_gitignore(gpath)
32
+ break
33
+ path = path.parent
34
35
self.callback_kwargs = callback_kwargs
36
37
def dispatch(self, event: FileSystemEvent) -> None:
0 commit comments