Skip to content

Commit

Permalink
Merge pull request airspeed-velocity#1369 from dstansby/clearer-error
Browse files Browse the repository at this point in the history
Improve error message when environment not found
  • Loading branch information
HaoZeke authored Jan 27, 2024
2 parents 1937408 + ab7bf9e commit 2f45881
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion asv/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,11 @@ def get_environment_class_by_name(environment_type):
for cls in util.iter_subclasses(Environment):
if cls.tool_name == environment_type:
return cls
tool_names = [cls.tool_name for cls in util.iter_subclasses(Environment)]
raise EnvironmentUnavailable(
f"Unknown environment type '{environment_type}'")
f"Unknown environment type '{environment_type}'. "
f"Allowed values based on existing plugins are {tool_names}."
)


def is_existing_only(environments):
Expand Down

0 comments on commit 2f45881

Please sign in to comment.