Fix build on Solaris

This commit is contained in:
Audrius Butkevicius
2014-09-28 21:54:07 +01:00
parent 991dc32a0b
commit e212b64823
4 changed files with 16 additions and 11 deletions

View File

@@ -9,8 +9,6 @@ import (
"errors"
"strconv"
"strings"
"bitbucket.org/kardianos/osext"
)
type Release struct {
@@ -40,12 +38,7 @@ func init() {
func UpgradeTo(rel Release, archExtra string) error {
select {
case <-upgradeUnlocked:
path, err := osext.Executable()
if err != nil {
upgradeUnlocked <- true
return err
}
err = upgradeTo(path, rel, archExtra)
err := upgradeTo(rel, archExtra)
// If we've failed to upgrade, unlock so that another attempt could be made
if err != nil {
upgradeUnlocked <- true