Skip to content

Commit

Permalink
Improve error message for missing conda-recipe-manager
Browse files Browse the repository at this point in the history
  • Loading branch information
maresb committed Sep 28, 2024
1 parent db87864 commit d0f7f9c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion grayskull/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,15 @@ def upgrade_v0_recipe_to_v1(recipe_path: Path) -> None:
JINJA plugin.
:param recipe_path: Path to that contains the original recipe file to modify.
"""
from conda_recipe_manager.parser.recipe_parser_convert import RecipeParserConvert
try:
from conda_recipe_manager.parser.recipe_parser_convert import (
RecipeParserConvert,
)
except ImportError as e:
raise ImportError(
"Please install conda-recipe-manager from conda-forge to enable "
"support for the V1 format."
) from e

recipe_content: Final[str] = RecipeParserConvert.pre_process_recipe_text(
recipe_path.read_text()
Expand Down

0 comments on commit d0f7f9c

Please sign in to comment.