Additional check for location of awscli @zfLQ2qx2

Additional check for location of awscli @zfLQ2qx2
This commit is contained in:
Toni de la Fuente
2021-01-13 21:25:04 +01:00
committed by GitHub

View File

@@ -12,8 +12,11 @@
# specific language governing permissions and limitations under the License.
# AWS-CLI detector variable
AWSCLI=$(which aws)
if [ -z "${AWSCLI}" ]; then
if [ ! -z $(which aws) ]; then
AWSCLI=$(which aws)
elif [ ! -z $(type -p aws) ]; then
AWSCLI=$(type -p aws)
else
echo -e "\n$RED ERROR!$NORMAL AWS-CLI (aws command) not found. Make sure it is installed correctly and in your \$PATH\n"
EXITCODE=1
exit $EXITCODE