Skip to content

[BUG] Index Error when installing app with service setting and no existing services #1283

Description

@jakeymac

Describe the bug
When attempting to install an app with a service setting and no existing services. the following error comes up:

File "/home/jjohnson/miniforge3/envs/test_services/bin/tethys", line 6, in
sys.exit(tethys_command())
~~~~~~~~~~~~~~^^
File "/home/jjohnson/erdc_project/migrations/tethys/tethys_cli/init.py", line 76, in tethys_command
args.func(args)
~~~~~~~~~^^^^^^
File "/home/jjohnson/erdc_project/migrations/tethys/tethys_cli/install_commands.py", line 923, in install_command
run_interactive_services(app_name)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
File "/home/jjohnson/erdc_project/migrations/tethys/tethys_cli/install_commands.py", line 458, in run_interactive_services
services = services_list_command(args)[0]
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range

To Reproduce
Steps to reproduce the behavior:

  1. Scaffold a new app in a clean Tethys environment with no services created.
  2. Add a service setting to the app.py file
  3. Run tethys install inside the app's directory

Expected behavior
The app should install and let the user know that the service setting will need to be assigned.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions