Skip to content

Commit c3ba83f

Browse files
committed
same cwd check for consume
1 parent 95f430e commit c3ba83f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/cli/pytest_commands/consume.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ def handle_hive_env_flags(args: List[str]) -> List[str]:
3131

3232
def handle_consume_command_flags(consume_args: List[str], is_hive: bool) -> List[str]:
3333
"""Handle all consume CLI flag pre-processing."""
34+
# Ensure the consume command was called in the root folder of execution-spec-tests repo
35+
cwd = Path(os.getcwd())
36+
cwd_as_list = list(cwd.parts)
37+
if cwd_as_list[-1].lower() != "execution-spec-tests":
38+
pytest.exit(
39+
"Please run the consume command in the root folder of the execution-spec-tests repo!"
40+
)
3441
args = list(handle_help_flags(consume_args, pytest_type="consume"))
3542
args += ["-c", "pytest-consume.ini"]
3643
if is_hive:

0 commit comments

Comments
 (0)