Skip to content

Commit dd75a82

Browse files
committed
Avoid double grep and grep -o (portability)
1 parent 0862095 commit dd75a82

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
@@ -62,7 +62,7 @@ if [ $rc -ne 0 ]; then
6262
fi
6363

6464
if [ -z "$legacy_version_output" ]; then
65-
version=$(echo "$output" | grep "GitHub Enterprise version" | grep -o "[0-9]*\.[0-9]*\.[0-9]*")
65+
version=$(echo "$output" | sed -n 's/GitHub Enterprise version \(.*\)/\1/p')
6666
else
6767
version=$(echo "$output" | grep version | cut -d'"' -f4)
6868
fi

0 commit comments

Comments
 (0)