Skip to content
This repository has been archived by the owner on Mar 8, 2022. It is now read-only.

Installation on Windows fails if gofish is already installed #57

Closed
notlmn opened this issue Apr 15, 2018 · 3 comments
Closed

Installation on Windows fails if gofish is already installed #57

notlmn opened this issue Apr 15, 2018 · 3 comments

Comments

@notlmn
Copy link
Contributor

notlmn commented Apr 15, 2018

Gofish cannot be installed (updated) with gofish because of #46.

But gofish also fails to install on Powershell as it refuses to replace gofish binary that already exits!

PS C:\Windows\system32> iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/fishworks/gofish/master/scripts/install.ps1'))
Downloading https://gofi.sh/releases/gofish-v0.4.0-windows-amd64.zip
Preparing to install into C:\ProgramData\bin
Move-Item : Cannot create a file when that file already exists.
At line:23 char:1
+ Move-Item -Path "$tempDir\windows-amd64\gofish.exe" -Destination "$in ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (C:\Users\xxxxxx...md64\gofish.exe:FileInfo) [Move-Item], IOException
    + FullyQualifiedErrorId : MoveFileInfoItemIOError,Microsoft.PowerShell.Commands.MoveItemCommand

gofish installed into C:\ProgramData\bin\gofish.exe
Restart your terminal, then run 'gofish init' to get started!
PS C:\Windows\system32>
@notlmn
Copy link
Contributor Author

notlmn commented Apr 15, 2018

This should be a separate issue but I tried to download and install gofish, but Chrome thinks its harmful.

image


I've even uploaded the archives to Virus Total and one engine suspects Windows zip archive, but not other archives.


Can this not be made go getable?

@bacongobbler
Copy link
Contributor

bacongobbler commented Apr 15, 2018

Yeah so the first thing is definitely a bug in the PowerShell script. Feel like taking a crack at it?

That's interesting that it's just the zip archive that's considered unsafe. They're created the exact same process as the tarball as seen in make dist: https://github.com/fishworks/gofish/blob/master/Makefile#L31-L39

Gofish is go get able (go get -u github.com/fishworks/gofish/cmd/gofish/...), but I'd rather users actually use the release binaries or build from source using dep instead because

  1. the release binaries have been guaranteed to be tested for quality assurance
  2. I cannot guarantee that the dependencies gofish relies on will always work on master

go get IMO is a horrible, horrible release tool due to its nature of fetching everything off master.

If you'd like to build from source, there's the hacking guide which follows through the steps to build from source.

@notlmn
Copy link
Contributor Author

notlmn commented Apr 15, 2018

Yeah so the first thing is definitely a bug in the PowerShell script. Feel like taking a crack at it?

#58

go get IMO is a horrible, horrible release tool due to its nature of fetching everything off master

Wonder why they ever designed it that way. I'm no Go programmer but what about versioned branches?

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

No branches or pull requests

2 participants