Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/instructlab/taxonomy/diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Standard
import logging
import os
import traceback

# Third Party
from git import GitError
Expand Down Expand Up @@ -71,8 +72,9 @@ def diff(ctx, taxonomy_path, taxonomy_base, yaml_rules, quiet):
# Gather the new or changed YAMLs using git diff, including untracked files
taxonomy_files = get_taxonomy_diff(taxonomy_path, taxonomy_base)
except (TaxonomyReadingException, GitError) as exc:
error_details = traceback.format_exc()
click.secho(
f"Reading taxonomy failed with the following error: {exc}",
f"Reading taxonomy failed with the following error: {exc}]\n{error_details}",
fg="red",
)
raise SystemExit(1) from exc
Expand All @@ -86,8 +88,9 @@ def diff(ctx, taxonomy_path, taxonomy_base, yaml_rules, quiet):
validate_taxonomy(taxonomy_path, taxonomy_base, yaml_rules)
except (TaxonomyReadingException, yaml.YAMLError) as exc:
if not quiet:
error_details = traceback.format_exc()
click.secho(
f"Reading taxonomy failed with the following error: {exc}",
f"Reading taxonomy failed with the following error: {exc}]\n{error_details}",
fg="red",
)
raise SystemExit(1) from exc
Expand Down
Loading