From 43611bb5ad3d65b404bec41600fdb78fc972a480 Mon Sep 17 00:00:00 2001 From: Manuel Buil Date: Wed, 14 Jun 2023 11:29:04 +0200 Subject: [PATCH] Fix the error report Signed-off-by: Manuel Buil --- pkg/vpn/vpn.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/vpn/vpn.go b/pkg/vpn/vpn.go index d3ae35475af7..77a628d28c6f 100644 --- a/pkg/vpn/vpn.go +++ b/pkg/vpn/vpn.go @@ -2,13 +2,13 @@ package vpn import ( "encoding/json" - "errors" "fmt" "net" "strings" "github.com/k3s-io/k3s/pkg/util" + "github.com/pkg/errors" "github.com/sirupsen/logrus" ) @@ -44,11 +44,11 @@ func StartVPN(vpnAuthConfigFile string) error { logrus.Infof("Starting VPN: %s", authInfo.Name) switch authInfo.Name { case "tailscale": - outpt, err := util.ExecCommand("tailscale", []string{"up", "--authkey", authInfo.JoinKey, "--reset"}) + output, err := util.ExecCommand("tailscale", []string{"up", "--authkey", authInfo.JoinKey, "--reset"}) if err != nil { - return err + return errors.Wrap(err, "tailscale up failed: "+output) } - logrus.Debugf("Output from tailscale up: %v", outpt) + logrus.Debugf("Output from tailscale up: %v", output) return nil default: return fmt.Errorf("Requested VPN: %s is not supported. We currently only support tailscale", authInfo.Name)