mzbat / iac_workshop

infrastructure as code workshop materials
MIT License
14 stars 22 forks source link

Reversing the aws conditional. #8

Closed jameskbride closed 6 years ago

jameskbride commented 6 years ago

The config.sh script contains a function which checks for the aws credentials:

if [ -f ~/.aws/credentials ] ; then
    echo -e "${YELLOW}"
    echo "No ~/.aws/credentials found!"
    echo "Follow the steps at: http://docs.aws.amazon.com/cli/latest/userguide/cli-config-files.html"
    echo ""
    echo -e "${NC}"
    ERROR_COUNTER=$((ERROR_COUNTER+1))
  else 
    echo -e "${CYAN}"
    aws --version
    echo "AWS Configuration looking good..."
    echo -e "${NC}"
  fi

The success/failure blocks appear to be reversed. This PR corrects the success case (if [ -f ~/.aws/credentials ] returns true).