Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
[WIP] Issue #72 Add update command #813
Based on what I have added through this PR and what I've understood by looking at the code:
Sure. I'd need some help on that however.
hferentschik left a comment
Even though generally doing what it is supposed to do, there are several issues. The code dealing with Windows is not correct. Also, there are the parts for the automatic update check which should be removed.
Overall, the code should be restructured to have a clearer structure. This would also allow to potentially add some unit tests. As it stands now, things are very entangled and as a result also hard to test.
2 times, most recently
May 12, 2017
referenced this pull request
May 13, 2017
@dharmit I believe the current issue with:
PS C:\work\src\github.com\minishift\minishift> C:\work\bin\minishift.exe update Updating to version 1.0.1 Downloading updated archive 3.27 MB / 3.43 MB [=======================================================================================================================================================>-------] 95.29% 0sD ownloading updated archive checksum to validate updated archive 65 B / 65 B [=====================================================================================================================================================================] 100.00% 0s E0515 21:17:22.983876 11760 update.go:135] Failed to execute updated binary C:\work\bin\minishift.exe: not supported by windows
might be related to kicking the executable out from underneath the running process and replace it with a new executable. you are then trying to invoke it from the same execution context. I guess this can lead to a disallowed state. After the/at the time of the run, you can actually find a
I am having same error.
It seems so.
+1, I am surprised it works so far, trying to call this executable which you just updated from within the same process it questionable. Looking at the go-update example, it does actually terminate after the update.
I know this was code which already existed, but I am not sure whether this was ever tested on Windows. I think we might be ok with removing it altogether and relying on the error reporting of go-update. Calling version on the new binary is nothing which is per se required as part of the update.
Update from my side,
Currently going through the comments in go-update issue inconshreveable/go-update#5.
https://github.com/inconshreveable/go-update hasn't been updated since a year.
I had kept the piece of code that executes something based off the newly downloaded binary because the old code did that. I'm wondering if it adds any value to execute