forked from phoenix-oss/llama-stack-mirror
fix: print traceback on build failure (#1966)
# What does this PR do? Build failures are hard to read, sometimes we get errors like: ``` Error building stack: 'key' ``` Which are difficult to debug without a proper trace. ## Test Plan If `llama stack build` fails you get a traceback now. Signed-off-by: Sébastien Han <seb@redhat.com>
This commit is contained in:
parent
f12011794b
commit
6ed92e03bc
1 changed files with 4 additions and 0 deletions
|
@ -235,10 +235,14 @@ def run_stack_build_command(args: argparse.Namespace) -> None:
|
|||
)
|
||||
|
||||
except (Exception, RuntimeError) as exc:
|
||||
import traceback
|
||||
|
||||
cprint(
|
||||
f"Error building stack: {exc}",
|
||||
color="red",
|
||||
)
|
||||
cprint("Stack trace:", color="red")
|
||||
traceback.print_exc()
|
||||
sys.exit(1)
|
||||
if run_config is None:
|
||||
cprint(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue