mirror of
https://github.com/kennethreitz/bake.git
synced 2026-06-05 23:00:17 +00:00
Merge pull request #11 from wookayin/patch-1
Improve Bakefile detection logic
This commit is contained in:
+3
-1
@@ -147,11 +147,13 @@ class Bakefile:
|
||||
i = 0
|
||||
for c, d, f in utils.walk_up(root):
|
||||
if i > max_depth:
|
||||
raise NoBakefileFound(f"No {filename} found!")
|
||||
break
|
||||
elif filename in f:
|
||||
return Class(path=os.path.join(c, filename))
|
||||
i += 1
|
||||
|
||||
raise NoBakefileFound(f"No {filename} found!")
|
||||
|
||||
@property
|
||||
def source(self):
|
||||
with open(self.path, "r") as f:
|
||||
|
||||
Reference in New Issue
Block a user