diff --git a/cli/mklink/facade/interactive.go b/cli/mklink/facade/interactive.go index f6bca08..31f60cd 100644 --- a/cli/mklink/facade/interactive.go +++ b/cli/mklink/facade/interactive.go @@ -9,7 +9,6 @@ import ( "github.com/spiegel-im-spiegel/gocli/rwi" "github.com/spiegel-im-spiegel/mklink/cli/mklink/makelink" "github.com/spiegel-im-spiegel/mklink/errs" - errors "golang.org/x/xerrors" ) func interactiveMode(ui *rwi.RWI, cxt *makelink.Context) error { @@ -37,7 +36,7 @@ func interactiveMode(ui *rwi.RWI, cxt *makelink.Context) error { prompt.WithHeaderMessage("Input 'q' or 'quit' to stop"), ) if !p.IsTerminal() { - return errors.New("not terminal (or pipe?)") + return errs.Wrap(prompt.ErrNotTerminal, "error in interactive mode") } return errs.Wrap(p.Run(), "error in interactive mode") } diff --git a/go.mod b/go.mod index 50f37c4..4f01f74 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/mattn/go-encoding v0.0.2 github.com/spf13/cobra v0.0.3 github.com/spf13/pflag v1.0.3 // indirect - github.com/spiegel-im-spiegel/gocli v0.9.2 + github.com/spiegel-im-spiegel/gocli v0.9.3 golang.org/x/net v0.0.0-20190301231341-16b79f2e4e95 golang.org/x/text v0.3.0 // indirect golang.org/x/xerrors v0.0.0-20190212162355-a5947ffaace3