"kardianos/osext" is obsolete on go-1.8+
The following patch allows to remove redundant github.com/kardianos/osext dependency:
--- a/executors/shell/executor_shell.go
+++ b/executors/shell/executor_shell.go
@@ -8,9 +8,8 @@
"os/exec"
"path/filepath"
"fmt"
- "github.com/kardianos/osext"
"github.com/sirupsen/logrus"
"gitlab.com/gitlab-org/gitlab-runner/common"
"gitlab.com/gitlab-org/gitlab-runner/executors"
"gitlab.com/gitlab-org/gitlab-runner/helpers"
@@ -126,9 +125,9 @@
}
func init() {
// Look for self
- runnerCommand, err := osext.Executable()
+ runnerCommand, err := os.Executable()
if err != nil {
logrus.Warningln(err)
}
--- a/vendor/github.com/ayufan/golang-kardianos-service/example/runner/runner.go
+++ b/vendor/github.com/ayufan/golang-kardianos-service/example/runner/runner.go
@@ -13,9 +13,8 @@
"os"
"os/exec"
"path/filepath"
- "github.com/kardianos/osext"
"github.com/kardianos/service"
)
// Config is the runner app config structure.
@@ -104,9 +103,9 @@
return nil
}
func getConfigPath() (string, error) {
- fullexecpath, err := osext.Executable()
+ fullexecpath, err := os.Executable()
if err != nil {
return "", err
}
--- a/vendor/github.com/ayufan/golang-kardianos-service/service.go
+++ b/vendor/github.com/ayufan/golang-kardianos-service/service.go
@@ -65,9 +65,9 @@
"errors"
"fmt"
"path/filepath"
- "github.com/kardianos/osext"
+ "os"
)
const (
optionKeepAlive = "KeepAlive"
@@ -120,9 +120,9 @@
func (c *Config) execPath() (string, error) {
if len(c.Executable) != 0 {
return filepath.Abs(c.Executable)
}
- return osext.Executable()
+ return os.Executable()
}
var (
system System