all: Use Executable from os instead of osext (fixes #4900) (#4950)

This commit is contained in:
Simon Frei
2018-05-13 07:43:24 +02:00
committed by Jakob Borg
parent 0c81fa4191
commit a7e30c925f
10 changed files with 3 additions and 302 deletions

View File

@@ -10,12 +10,11 @@ package upgrade
import (
"errors"
"fmt"
"os"
"path"
"runtime"
"strconv"
"strings"
"github.com/kardianos/osext"
)
type Release struct {
@@ -45,7 +44,7 @@ func init() {
func To(rel Release) error {
select {
case <-upgradeUnlocked:
path, err := osext.Executable()
path, err := os.Executable()
if err != nil {
upgradeUnlocked <- true
return err
@@ -64,7 +63,7 @@ func To(rel Release) error {
func ToURL(url string) error {
select {
case <-upgradeUnlocked:
binary, err := osext.Executable()
binary, err := os.Executable()
if err != nil {
upgradeUnlocked <- true
return err