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

@@ -19,10 +19,16 @@ import (
"path/filepath"
"runtime"
"strings"
"bitbucket.org/kardianos/osext"
)
// Upgrade to the given release, saving the previous binary with a ".old" extension.
func upgradeTo(path string, rel Release, archExtra string) error {
func upgradeTo(rel Release, archExtra string) error {
path, err := osext.Executable()
if err != nil {
return err
}
osName := runtime.GOOS
if osName == "darwin" {
// We call the darwin release bundles macosx because that makes more