add error message to ValueError

This commit is contained in:
Daniel 2023-12-04 14:41:26 +01:00
parent 82fcc0bafb
commit dc0e568c04

View file

@ -1,8 +1,6 @@
from pathlib import Path from pathlib import Path
from typing import NamedTuple from typing import NamedTuple
from loguru import logger
class EnvFile(NamedTuple): class EnvFile(NamedTuple):
env_path: Path env_path: Path
@ -55,5 +53,6 @@ def sort_env_files_by_rule(env_list: list[EnvFile], rules: list[DependencyRule])
if all(rule_satisfied): if all(rule_satisfied):
return in_list return in_list
logger.error("could not find order that satisfys all rules") raise ValueError(
raise ValueError "Could not resolve test order. This is possibly due to a circular dependency (a on b, b on c, c on a)"
)