Don't assume git is in /usr/bin; expect it on PATH

This commit is contained in:
Reid Vandewiele 2019-10-16 12:46:30 -07:00 committed by Romain Tartière
parent ada94157a4
commit e46d209f19

View File

@ -24,9 +24,9 @@ elif [ -e /opt/puppetlabs/server/pe_version ]; then
# being available. # being available.
ruby $1/$2/scripts/config_version-rugged.rb $1 $2 ruby $1/$2/scripts/config_version-rugged.rb $1 $2
elif [ -x /usr/bin/git ]; then elif type git >/dev/null; then
# The git command is available. # The git command is available.
/usr/bin/git --git-dir $1/$2/.git rev-parse HEAD git --git-dir $1/$2/.git rev-parse HEAD
else else
# Nothing else available; just use the date. # Nothing else available; just use the date.