agent: use os.Executable

pull/4275/head
Mitchell Hashimoto 2018-05-02 14:05:43 -07:00
parent 39974df52a
commit 6ae95d754c
No known key found for this signature in database
GPG Key ID: 744E147AA52F5B0A
1 changed files with 1 additions and 2 deletions

View File

@ -41,7 +41,6 @@ import (
"github.com/hashicorp/memberlist" "github.com/hashicorp/memberlist"
"github.com/hashicorp/raft" "github.com/hashicorp/raft"
"github.com/hashicorp/serf/serf" "github.com/hashicorp/serf/serf"
"github.com/kardianos/osext"
"github.com/shirou/gopsutil/host" "github.com/shirou/gopsutil/host"
"golang.org/x/net/http2" "golang.org/x/net/http2"
) )
@ -2112,7 +2111,7 @@ func (a *Agent) RemoveProxy(proxyID string, persist bool) error {
func (a *Agent) defaultProxyCommand() ([]string, error) { func (a *Agent) defaultProxyCommand() ([]string, error) {
// Get the path to the current exectuable. This is cached once by the // Get the path to the current exectuable. This is cached once by the
// library so this is effectively just a variable read. // library so this is effectively just a variable read.
execPath, err := osext.Executable() execPath, err := os.Executable()
if err != nil { if err != nil {
return nil, err return nil, err
} }