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

fix: tar bin/helm-s3 Not found in archive #466

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

arahmangulov
Copy link

@arahmangulov arahmangulov commented Oct 5, 2024

What type of PR is this?
/kind fix

What this PR does / why we need it:
This PR fixes helm-s3 plugin installation on Windows (CYGWIN, MINGW, MSYS_NT) platforms.
Can be reproduced via installing any version above v0.14.0, example:

$ helm plugin install https://github.com/hypnoglow/helm-s3.git --version v0.16.2
Downloading and installing helm-s3 v0.16.2 ...
Checksum is valid.
tar: bin/helm-s3: Not found in archive
tar: Exiting with failure status due to previous errors
helm-s3 install hook failed. Please remove the plugin using 'helm plugin remove s3' and install again.
Error: plugin install hook for "s3" exited with error

This issue started happening after chaning the way of extracting the binary from the tarball: e9e5382#diff-3bac97673cfc352e120c81f8812245c509aa6dfe24f5eeeb07162159fe82aef5L99
While mv command is good with moving binary without explicit extension definition, the tar is pretty restrictive on this, so it's failing on the extraction stage. So, I just added binary_extension variable which would be empty for UNIX/Linux systems, and .exe suffix will be appended for Windows installations.

Also this MR fixes os variable usage, the previous initOS function had os definition with uname -s value and there are unecessary plain uname calls happening later on.

Fixed <4-spaces indentations as well.

Which issue(s) this PR fixes:

Special notes for your reviewer:
NONE

Does this PR introduce a user-facing change?:

Fixes helm-s3 plugin installation on Windows platforms

@arahmangulov arahmangulov changed the title fix: tar bin/helm-s3: Not found in archive fix: tar bin/helm-s3 Not found in archive Oct 5, 2024
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

Successfully merging this pull request may close these issues.

1 participant