Skip to content

Commit f3349c4

Browse files
authored
Merge pull request #3 from gruntwork-io/fix-os-is-amazon-linux
Update grep to work for both Amazon 1&2 images
2 parents f3c6ce5 + 78eddc6 commit f3349c4

File tree

1 file changed

+1
-1
lines changed
  • modules/bash-commons/src

1 file changed

+1
-1
lines changed

modules/bash-commons/src/os.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function os_get_available_memory_mb {
1313
# can use regex. If you don't care about the version, leave it unspecified.
1414
function os_is_amazon_linux {
1515
local readonly version="$1"
16-
grep -q "Amazon Linux release $version" /etc/*release
16+
grep -q "Amazon Linux * $version" /etc/*release
1717
}
1818

1919
# Returns true (0) if this is an Ubuntu server at the given version or false (1) otherwise. The version number

0 commit comments

Comments
 (0)