-
Notifications
You must be signed in to change notification settings - Fork 13
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
declare: -A: invalid option on macOS #13
Comments
Hey @gangadharjannu, thank you for reporting this. The plugin was developed on Linux machines, and we would be happy to add support for macOS.
We are happy to get code contributions for any of these. Please let me know if you'd like to work on them. |
Issues 2, and 3 were addressed in PR #15 , thank you @gangadharjannu ! |
here's a quick Mac fix for number 1 above: brew install bash # should get you bash v5+ at time of writing
/opt/homebrew/bin/bash # drops you into a subshell with the correct version
helm release pull -n <yadda yadda> <release-you-need-a-chart-for> this works because the plugin dev (thanks @jovianx-dev !) used the By dropping yourself into version 4+ of bash you get all the associative array goodness that @jovianx-dev is using to make the plugin scripts nice and clean. Happy helming! |
@jovianx-dev I want to thank you for your efforts in developing this plugin. I used this plugin to pull the helm charts from deployed helm releases and it worked on my macOS machine, however there are 2 issues I want to highlight
While running helm release pull on macOS, I am getting below errors related to
user@usersmac> helm release pull nodejs-sample -n my-test-namespace
declare: -A is not supported on macOS and the reason is explained in https://stackoverflow.com/questions/27002192/bash-declare-a-does-not-work-on-macos. Summary is declare -A (associative arrays) are a bash 4+ feature and the macOS bash is likely 3.X.
yq
is also a dependency for your script, so I had to create symlink for yq to/Users/user/Library/helm/plugins/helm-release-plugin/lib/yq
location.For Issue 1: We can mention in readme to upgrade bash on macOS to version 4.
For Issue 2: I created symlink and it worked and created values.yaml files (before that values.yaml file was empty)
How can we resolve this issues ?
I am happy to contribute anyway.
EDIT:
The issue with
yq
could be related to installation using wget on line 23. Since wget is not available by default on macOS, it is not able to get yq and because of that it is throwing errors.The text was updated successfully, but these errors were encountered: