Skip to content

Commit

Permalink
Fix blocked situation when no conf is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliGautier committed Nov 5, 2024
1 parent f9ab7ff commit 8ce539e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions arlas/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,12 @@ def init(
print(arlas_cli_version)
if os.path.exists(variables["configuration_file"]):
Configuration.init(configuration_file=variables["configuration_file"])
if Configuration.settings.arlas and len(Configuration.settings.arlas) > 0:
# Configuration is ok.
...
if "arlas" in dict(Configuration.settings):
if len(Configuration.settings.arlas) > 0:
# Configuration is ok.
...
else:
print("Warning : no configuration available")
else:
print("Error : no arlas endpoint found in {}.".format(variables["configuration_file"]), file=sys.stderr)
sys.exit(1)
Expand Down

0 comments on commit 8ce539e

Please sign in to comment.