windows path handling

This commit is contained in:
Michael Quigley 2024-08-23 12:49:12 -04:00
parent d8c9681da1
commit 1808747215
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62

View File

@ -8,6 +8,8 @@ import (
"github.com/spf13/cobra"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
"path/filepath"
"strings"
)
func init() {
@ -39,6 +41,7 @@ func (cmd *agentVersionCommand) run(_ *cobra.Command, _ []string) {
if err != nil {
tui.Error("error getting agent socket", err)
}
agentSocket = filepath.ToSlash(strings.Replace(agentSocket, ":", "", -1))
conn, err := grpc.NewClient("unix://"+agentSocket, grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {