File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -25,3 +25,15 @@ validate_semver() {
25
25
validate_tool_installed () {
26
26
_run_validator " fabasoad_validate_tool_installed" " $@ "
27
27
}
28
+
29
+ validate_bash_version () {
30
+ minimum_required_major_version=4
31
+ bash_version=$( bash --version | head -n 1 | cut -d ' ' -f 4)
32
+ bash_major=$( echo " ${bash_version} " | cut -d ' .' -f 1)
33
+ if [ " ${bash_major} " -lt " ${minimum_required_major_version} " ]; then
34
+ msg=" bash version ${minimum_required_major_version} .0 or higher is required."
35
+ msg=" ${msg} Current version is ${bash_version} ."
36
+ fabasoad_log " error" " ${msg} "
37
+ exit 1
38
+ fi
39
+ }
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ _import_all() {
17
17
_validate_prerequisites () {
18
18
validate_tool_installed " jq"
19
19
validate_tool_installed " curl"
20
+ validate_bash_version
20
21
}
21
22
22
23
main () {
You can’t perform that action at this time.
0 commit comments