diff --git a/bin/ghe-host-check b/bin/ghe-host-check index 45fd9ce7b..c1713314a 100755 --- a/bin/ghe-host-check +++ b/bin/ghe-host-check @@ -84,7 +84,7 @@ if [ $rc -ne 0 ]; then exit $rc fi -version=$(echo "$output" | sed -E -n 's/GitHub Enterprise( Server)? version (.*)/\2/p') +version=$(echo "$output" | grep "GitHub Enterprise" | awk '{print $NF}') if [ -z "$version" ]; then echo "Error: failed to parse version on '$host' or this isn't a GitHub appliance." 1>&2