Skip to content

Commit

Permalink
FIX: Make service config optional for octue question ask remote
Browse files Browse the repository at this point in the history
skipci
  • Loading branch information
cortadocodes committed Feb 4, 2025
1 parent 2ea1cc3 commit f6b9c94
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions octue/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ def ask():
"--service-config",
type=click.Path(dir_okay=False),
default=None,
help="An optional path to an `octue.yaml` file specifying service registries.",
help="An optional path to an `octue.yaml` file defining service registries to use. If not provided, the "
"`OCTUE_SERVICE_CONFIGURATION_PATH` environment variable is used if present, otherwise the local path `octue.yaml` "
"is used.",
)
def remote(sruid, input_values, input_manifest, project_name, asynchronous, service_config):
"""Ask a question to a remote Octue Twined service.
Expand All @@ -129,10 +131,10 @@ def remote(sruid, input_values, input_manifest, project_name, asynchronous, serv
e.g. octue question ask octue/example-service:1.0.3
"""
if service_config:
try:
service_configuration = ServiceConfiguration.from_file(service_config)
service_registries = service_configuration.service_registries
else:
except FileNotFoundError:
service_registries = None

if input_values:
Expand Down

0 comments on commit f6b9c94

Please sign in to comment.