Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/bashly/libraries/strings/strings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ examples_caption_on_error: 'examples:'
disallowed_flag: "%{name} must be one of: %{allowed}"
disallowed_argument: "%{name} must be one of: %{allowed}"
disallowed_environment_variable: "%{name} environment variable must be one of: %{allowed}"
unsupported_bash_version: "bash version 4 or higher is required"
unsupported_bash_version: "bash version 4.2 or higher is required"
validation_error: "validation error in %s:\\n%s"
environment_variable_validation_error: "validation error in environment variable %s:\\n%s"
7 changes: 5 additions & 2 deletions lib/bashly/views/wrapper/bash3_bouncer.gtx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
= view_marker

> if [[ "${BASH_VERSINFO:-0}" -lt 4 ]]; then
> if ((BASH_VERSINFO[0] < 4 || (BASH_VERSINFO[0] == 4 && BASH_VERSINFO[1] < 2))); then
> printf "{{ strings[:unsupported_bash_version] }}\n" >&2
> exit 1
> fi
>
>



2 changes: 1 addition & 1 deletion spec/approvals/bash/error
Original file line number Diff line number Diff line change
@@ -1 +1 @@
bash version 4 or higher is required
bash version 4.2 or higher is required
4 changes: 2 additions & 2 deletions spec/approvals/script/wrapper/code
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Modifying it manually is not recommended

# :wrapper.bash3_bouncer
if [[ "${BASH_VERSINFO:-0}" -lt 4 ]]; then
printf "bash version 4 or higher is required\n" >&2
if ((BASH_VERSINFO[0] < 4 || (BASH_VERSINFO[0] == 4 && BASH_VERSINFO[1] < 2))); then
printf "bash version 4.2 or higher is required\n" >&2
exit 1
fi

Expand Down