Skip to content

Commit

Permalink
[task] return error if aws or az cli are not installed (#970)
Browse files Browse the repository at this point in the history
  • Loading branch information
pducolin authored Jul 23, 2024
1 parent 9be6178 commit aeda0c3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tasks/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ def setup(
"""
Setup a local environment, interactively by default
"""
# Ensure aws cli is installed
if not shutil.which("aws"):
error("AWS CLI not found, please install it: https://aws.amazon.com/cli/")
raise Exit(code=1)
# Ensure azure cli is installed
if not shutil.which("az"):
error("Azure CLI not found, please install it: https://learn.microsoft.com/en-us/cli/azure/install-azure-cli")
raise Exit(code=1)

pulumi_version, pulumi_up_to_date = _pulumi_version(ctx)
if pulumi_up_to_date:
info(f"Pulumi is up to date: {pulumi_version}")
Expand Down

0 comments on commit aeda0c3

Please sign in to comment.