Conditions | 4 |
Total Lines | 12 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 4 |
Changes | 0 |
1 | # coding: utf-8 |
||
27 | 1 | def find_project_dir(): |
|
28 | """Determine the project base dir, by searching a stakkr.yml file""" |
||
29 | 1 | path = getcwd() |
|
30 | 1 | while True: |
|
31 | 1 | files = listdir(path) |
|
32 | 1 | if 'stakkr.yml' in files: |
|
33 | 1 | return path |
|
34 | |||
35 | 1 | new_path = dirname(path) |
|
36 | 1 | if new_path == path: |
|
37 | 1 | raise FileNotFoundError('Could not find config file (stakkr.yml)') |
|
38 | path = new_path |
||
39 |