diff --git a/src/sinol_make/util.py b/src/sinol_make/util.py index 68c2f4f9..6940520d 100644 --- a/src/sinol_make/util.py +++ b/src/sinol_make/util.py @@ -33,11 +33,13 @@ def check_if_package(): """ Function to check if current directory is a package """ - - cwd = os.getcwd() - if os.path.exists(os.path.join(cwd, 'config.yml')): + if os.path.exists(os.path.join(os.getcwd(), 'config.yml')): + return True + elif os.path.exists(os.path.join(os.getcwd(), '..', 'config.yml')): + os.chdir('..') return True - return False + else: + return False def exit_if_not_package():