Skip to content

Commit b545c99

Browse files
committed
updated error message on invalid stag repository
1 parent 79b488b commit b545c99

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

stagfs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -993,12 +993,8 @@ def main(ctx, debug, repo):
993993
for path in os.listdir(repo):
994994
path = f"{repo}/{path}"
995995

996-
if not os.path.isdir(path):
997-
print(f"{path} is not a folder, are you sure this is a Stag repository?")
998-
sys.exit(1)
999-
1000-
if "stag.sql" not in os.listdir(path):
1001-
print(f"couldn't find database in {path}, are you sure this is a Stag repository?")
996+
if not os.path.isdir(path) or "stag.sql" not in os.listdir(path):
997+
print(f"Unknown files were located in {repo}, this cannot be a valid Stag repositorys")
1002998
sys.exit(1)
1003999

10041000
return

0 commit comments

Comments
 (0)