Update dependencies

pull/9/head v0.2.6
Trevor Slocum 2020-01-27 16:23:47 -08:00
parent 92317a4ce3
commit e8346b5323
4 changed files with 7 additions and 14 deletions

3
go.mod
View File

@ -9,8 +9,7 @@ require (
github.com/lithammer/fuzzysearch v1.1.0
github.com/mattn/go-isatty v0.0.12
github.com/mattn/go-runewidth v0.0.8 // indirect
github.com/pkg/errors v0.9.1
gitlab.com/tslocum/cview v1.4.1
gitlab.com/tslocum/desktop v0.1.4-0.20200123010527-46712e512c7d
gitlab.com/tslocum/desktop v0.1.4
golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9 // indirect
)

8
go.sum
View File

@ -22,16 +22,12 @@ github.com/mattn/go-runewidth v0.0.7 h1:Ei8KR0497xHyKJPAv59M1dkC+rOZCMBJ+t3fZ+tw
github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
github.com/mattn/go-runewidth v0.0.8 h1:3tS41NlGYSmhhe/8fhGRzc+z3AYCw1Fe1WAyLuujKs0=
github.com/mattn/go-runewidth v0.0.8/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/rivo/uniseg v0.1.0 h1:+2KBaVoUmb9XzDsrx/Ct0W/EYOSFf/nWTauy++DprtY=
github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
gitlab.com/tslocum/cview v1.4.1 h1:bG1ugSSFEe8B6poP+xEeo7OIP+Ph4JBOs1fAVtuvgjY=
gitlab.com/tslocum/cview v1.4.1/go.mod h1:QbxliYQa2I32UJH2boP54jq6tnWlgm6yViaFXKGDfuM=
gitlab.com/tslocum/desktop v0.1.4-0.20200123010527-46712e512c7d h1:JlNn0QBnwVK3sZjqf9z+6JkTIN1UWU6lWQqAm1SadvI=
gitlab.com/tslocum/desktop v0.1.4-0.20200123010527-46712e512c7d/go.mod h1:ujaXLjKXzooMcFT/+pUYFVIFBmBDehD+yBz6AUIuDGw=
gitlab.com/tslocum/desktop v0.1.4 h1:ew+nJFAaNLXQw9SlX3M2OZjHd55SJCc5k3J+rQUPA4E=
gitlab.com/tslocum/desktop v0.1.4/go.mod h1:xegVIo1fwhovdUkErI999g3qb5gK9T7+s76hMLDOXRg=
golang.org/x/sys v0.0.0-20190626150813-e07cf5db2756/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200103143344-a1369afcdac7 h1:/W9OPMnnpmFXHYkcp2rQsbFUbRlRzfECQjmAFiOyHE8=
golang.org/x/sys v0.0.0-20200103143344-a1369afcdac7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=

View File

@ -8,7 +8,6 @@ import (
"strings"
"github.com/lithammer/fuzzysearch/fuzzy"
"github.com/pkg/errors"
"gitlab.com/tslocum/desktop"
)
@ -232,7 +231,7 @@ func Run(config *Config, execute string, path string, runInTerminal bool, waitUn
runScript, err := desktop.RunScript(execute)
if err != nil {
return errors.Wrap(err, "failed to create run script")
return fmt.Errorf("failed to create run script: %s", err)
}
return run(config, runScript, path, waitUntilFinished, runInTerminal)

View File

@ -3,11 +3,10 @@
package gmenu
import (
"fmt"
"os"
"os/exec"
"syscall"
"github.com/pkg/errors"
)
func run(config *Config, runScript string, path string, waitUntilFinished, runInTerminal bool) error {
@ -27,7 +26,7 @@ func run(config *Config, runScript string, path string, waitUntilFinished, runIn
err := cmd.Start()
if err != nil {
return errors.Wrap(err, "failed to start command")
return fmt.Errorf("failed to start command: %s", err)
}
if !waitUntilFinished {
@ -37,7 +36,7 @@ func run(config *Config, runScript string, path string, waitUntilFinished, runIn
err = cmd.Wait()
_, isExitErr := err.(*exec.ExitError)
if err != nil && !isExitErr {
return errors.Wrap(err, "failed to execute command")
return fmt.Errorf("failed to execute command: %s", err)
}
return nil