Skip to content

Commit

Permalink
Updated vendored kardianos/osext dependency.
Browse files Browse the repository at this point in the history
It seems that someone else finally caught onto the fact that the OpenBSD
mechanism was broken in the os package's implementation:

kardianos/osext#22
golang/go#19453

A fix will be available in Go 1.9, and in the mean time the osext
package has been updated to use its old method. Once 1.9 rolls out,
we'll get rid of the osext dependency.
  • Loading branch information
xenoscopic committed Jul 25, 2017
1 parent 1a588cb commit 7314203
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions process/current.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ var Current struct {

func init() {
// Compute the current executable's path.
// TODO: In Go 1.8, there's going to be an os.Executable function that will
// serve this exact same purpose, so switch to that and remove the osext
// TODO: In Go 1.9, os.Executable will be fixed for OpenBSD (it will do what
// osext does at the moment), so switch to that and remove the osext
// dependency, licensing, and vendored code.
if path, err := osext.Executable(); err != nil {
panic(errors.Wrap(err, "unable to compute current executable's path"))
Expand All @@ -24,8 +24,8 @@ func init() {
}

// Compute the current executable's parent path.
// TODO: In Go 1.8, switch to just taking the parent directory of what's
// returned by os.Executable.
// TODO: In Go 1.9, switch to just taking the parent directory of what's
// returned by os.Executable. That's exactly what osext does at the moment.
if path, err := osext.ExecutableFolder(); err != nil {
panic(errors.Wrap(err, "unable to compute current executable's parent path"))
} else {
Expand Down
2 changes: 1 addition & 1 deletion vendor/github.com/kardianos/osext

0 comments on commit 7314203

Please sign in to comment.