title: Trying to run sh script and getting docker-compose not installed error?
body: <p>I'm trying to run a shell script to check if docker-compose is installed. I do so by running this code in a .sh file and running <code>sudo ./xyz.sh</code> on the cli:</p>
  
  <pre><code>#!/bin/bash
  
  if ! [[ -x "$(command -v docker-compose)" ]]; then
    echo 'Error: docker-compose is not installed.' &gt;&amp;2
    exit 1
  fi
  </code></pre>
  
  <p>When I run docker-compose --version from command line i get back: docker-compose version 1.24.0, build 0aa59064</p>
  
  <p><code>which docker-compose</code> gives me /usr/local/bin/docker-compose</p>
  
  <p>My server is Linux version 4.14.171-105.231.amzn1.x86_64 (mockbuild@koji-pdx-corp-builder-64005) (gcc version 7.2.1 20170915 (Red Hat 7.2.1-2) (GCC)) #1 SMP Thu Feb 27 23:49:15 UTC 2020</p>
  
  <p>Any ideas on what is wrong here?</p>