Using #!/usr/bin/env bash instead of #!/bin/bash in the BASH scripts of the e2e tests

Description

Appears that on Mac the default /bin/bash shell is not the newest version. For some of the test cases we use BASH features which are available in the latest versions.

Currently, the bash scripts use

#!/bin/bash

at the beginning, which works on recent Linux distros, but not on Macs. Mac users need to install a recent BASH version with macports or homebrew. However, that bash version won't replace the default one. In order to keep the shell scripts consistent, we should use a different shebang line, like this:

#!/usr/bin/env bash

See: https://stackoverflow.com/questions/10376206/what-is-the-preferred-bash-shebang

Environment

None

Activity

Show:

Pavel Tankov August 16, 2023 at 1:15 PM

We cannot do that for kuttl tests until we figure out how to force the usage of specific shell interpreter to script parts of tests. So, we have decided not to implement this change for now until we figure out how to do it for all operators.

Won't Do

Details

Assignee

Reporter

Needs QA

Yes

Components

Priority

Smart Checklist

Created August 7, 2023 at 12:24 PM
Updated August 16, 2023 at 1:15 PM
Resolved August 16, 2023 at 1:15 PM