mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-03 09:53:45 +00:00
chore(release-0.3.x): handle missing external_providers_dir (#4011)
Cherry-pick of #3974 to release-0.3.x branch. ## Summary - Fixes handling of missing external_providers_dir in stack configuration ## Original PR Fixes from #3974 Signed-off-by: Doug Edgar <dedgar@redhat.com> Co-authored-by: Doug Edgar <dedgar@redhat.com>
This commit is contained in:
parent
a488d8ce10
commit
73d70546d4
3 changed files with 25 additions and 10 deletions
|
|
@ -106,7 +106,8 @@ class StackRun(Subcommand):
|
|||
|
||||
try:
|
||||
config = parse_and_maybe_upgrade_config(config_dict)
|
||||
if not os.path.exists(str(config.external_providers_dir)):
|
||||
# Create external_providers_dir if it's specified and doesn't exist
|
||||
if config.external_providers_dir and not os.path.exists(str(config.external_providers_dir)):
|
||||
os.makedirs(str(config.external_providers_dir), exist_ok=True)
|
||||
except AttributeError as e:
|
||||
self.parser.error(f"failed to parse config file '{config_file}':\n {e}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue