If $(...) command substitution does not work in an environment, we might be better served by resolving the environment instead of degrading the quality of the shell script.
For instance, MacOS has the tendency to ship older (outdated) versions of BASH (v3 or even v2).
This issue might be resolved by updating the used bash version.
This violates ShellChecks SC2006 imparative.
If
$(...)
command substitution does not work in an environment, we might be better served by resolving the environment instead of degrading the quality of the shell script.For instance, MacOS has the tendency to ship older (outdated) versions of BASH (v3 or even v2).
This issue might be resolved by updating the used bash version.