Skip to content

Commit c2e1e64

Browse files
authored
Merge pull request #509 from github/taz/fix-host-check-portability
Replace "sed -E" in ghe-host-check with a more portable solution
2 parents 0b42e11 + dba7848 commit c2e1e64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/ghe-host-check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ if [ $rc -ne 0 ]; then
8484
exit $rc
8585
fi
8686

87-
version=$(echo "$output" | sed -E -n 's/GitHub Enterprise( Server)? version (.*)/\2/p')
87+
version=$(echo "$output" | grep "GitHub Enterprise" | awk '{print $NF}')
8888

8989
if [ -z "$version" ]; then
9090
echo "Error: failed to parse version on '$host' or this isn't a GitHub appliance." 1>&2

0 commit comments

Comments
 (0)