fix prompt with name args (#80)

This commit is contained in:
Xi Yan 2024-09-18 23:48:31 -07:00 committed by GitHub
parent c63d6cbd08
commit 6302a1ee90
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -191,7 +191,13 @@ class StackBuild(Subcommand):
return
if not args.config and not args.template:
name = prompt("> Enter a name for your Llama Stack (e.g. my-local-stack): ")
if not args.name:
name = prompt(
"> Enter a name for your Llama Stack (e.g. my-local-stack): "
)
else:
name = args.name
image_type = prompt(
"> Enter the image type you want your Llama Stack to be built as (docker or conda): ",
validator=Validator.from_callable(