Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bash compatibility #53

Open
noraj opened this issue Jun 6, 2019 · 2 comments
Open

bash compatibility #53

noraj opened this issue Jun 6, 2019 · 2 comments

Comments

@noraj
Copy link

noraj commented Jun 6, 2019

$ ./les.sh
Script needs Bash in version 4.0 or newer. Aborting.

It says LES supports only bash 4.0+ and I was running it on bash 3.1 so I understand.

But on #3 you said

To avoid these kind of errors I've added bash version checking on script's startup. 4.0 is needed for associative arrays, =~ operator was added in 3.* so we should be good now.

So finally 3.* is not supported?

@bcoles
Copy link
Contributor

bcoles commented Jun 6, 2019

Bash 4.0+ is required.

The comment you're referring to:

To avoid these kind of errors I've added bash version checking on script's startup. 4.0 is needed for associative arrays, =~ operator was added in 3.* so we should be good now.

is in reference to two problems discussed in that issue, both of which were encountered when using older versions of Bash.

The first issue related to associative arrays, which require Bash 4+.

The second issue related to use of =~ matches which required Bash ~3+.

we should be good now implies that a version check for 4+ was considered sufficient to close the issue. There was no point trying to support =~, as that doesn't solve the requirement for associative arrays, which requires Bash version 4+.

If, in the future, older versions of Bash were to be supported, it would require a substantial rewrite to remove the use of assoc arrays.

@noraj
Copy link
Author

noraj commented Jun 7, 2019

@bcoles It's clear now, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants