File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -14,10 +14,14 @@ main.basalt-package-init() {
1414source " $__basalt_dirname /pkg/src/util/init.sh"
1515else
1616printf ' %s\n' " Fatal: main.basalt: Variable '__basalt_dirname' is empty" >&2
17+ printf ' %s\n' ' exit 1'
1718exit 1
1819fi
1920fi
20- init.ensure_bash_version
21+ if ! init.assert_bash_version; then
22+ printf ' %s\n' ' exit 1'
23+ exit 1
24+ fi
2125
2226init.print_package_init
2327}
Original file line number Diff line number Diff line change @@ -12,7 +12,9 @@ main.basalt() {
1212fi
1313source " $__basalt_dirname /pkg/src/util/init.sh"
1414fi
15- init.ensure_bash_version
15+ if ! init.assert_bash_version; then
16+ exit 1
17+ fi
1618
1719# Don't re-source files when doing testing. This speeds up testing and also
1820# ensures function stubs are not overriden
Original file line number Diff line number Diff line change 11# shellcheck shell=bash
22
3- init.ensure_bash_version () {
3+ init.assert_bash_version () {
44if ! (( BASH_VERSINFO[0 ] >= 5 || (BASH_VERSINFO[0 ] >= 4 && BASH_VERSINFO[1 ] >= 3 ) )) ; then
55printf ' %s\n' ' Fatal: Basalt: Basalt requires at least Bash version 4.3' >&2
6- exit 1
6+ return 1
77fi
88}
99
You can’t perform that action at this time.
0 commit comments