Unable to unzip Lens for new app
I was trying to add Lens to arkade. When trying to download it on a mac, arkade failed to unzip the file.
Expected Behaviour
Lens would be downloaded, extracted, and the binary placed in the arkade bin folder
Current Behaviour
arkade get lens fails with the following error:
Error: error creating zip reader: zip: not a valid zip file
This is generated on the call to unzip.Unzip, line 20.
Looking at the code, there aren't any other applications that use zip for MacOS, so there might be something on the unzip code that doesn't work well for that specific OS.
Possible Solution
Steps to Reproduce (for bugs)
- git clone https://github.com/rberrelleza/arkade
- cd arkade
- git checkout install-lens
- make
- ./arkade get lens
Your Environment
- Operating System and version (e.g. Linux, Windows, MacOS):
MacOS Catalina 10.15.4
- What arkade version is this? Latest from master
/set title: Unable to unzip Lens for new app
@tuananh @Amalkh5 do you have any suggestions? Could this be specific to the format of zip that lens is using?
@alexellis i think this is specific to format the lens is using because they are using dmg. And i would suggest to update zip code to support that format.
DMG zip file?
I think i was wrong with unzip the .dmg because this format is not archive type file.
Maybe the solution is to support .dmg in get command by mount and then install the app.
@Amalkh5 @alexellis in my branch I'm downloading the zip file for MacOS, not the dmg. (https://github.com/rberrelleza/arkade/blob/install-lens/pkg/get/tools.go#L323).
Zip files worked elsewhere. Can you look into why theirs isn't supported Ramiro?
@alexellis @rberrelleza I tried to unzip the file through the command line and i got the following error:
$ unzip Lens-3.5.3-mac.zip
Archive: Lens-3.5.3-mac.zip
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of Lens-3.5.3-mac.zip or
Lens-3.5.3-mac.zip.zip, and cannot find Lens-3.5.3-mac.zip.ZIP, period.
Interesting @Amalkh5 ! I unzipped it by double clicking on it and it work fine. Wonder was different between that and using unzip
The Linux option appears to be a .AppImage extension.. what is that?
I also got an issue with unzip:
kosmos:tmp alex$ unzip Lens-3.6.0-rc.1-mac.zip
Archive: Lens-3.6.0-rc.1-mac.zip
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of Lens-3.6.0-rc.1-mac.zip or
Lens-3.6.0-rc.1-mac.zip.zip, and cannot find Lens-3.6.0-rc.1-mac.zip.ZIP, period.
kosmos:tmp alex$
It appears to actually be a tar.gz with the wrong extension.
tar -xvf Lens-3.6.0-rc.1-mac.zip
@alexellis appimage is like DMG for linux, first time I've seen one in github (https://appimage.org/).
It appears to actually be a tar.gz with the wrong extension.
That explains the error I saw. Should we close this since it's an external issue?