From a5b7ca90fc9d0f808e7fd30a86b41e6e752f5fe8 Mon Sep 17 00:00:00 2001 From: Adrien Raffin-Caboisse Date: Tue, 2 Nov 2021 11:58:43 +0100 Subject: [PATCH] fix(netclient): get only first part of the hostname If the hostname is full, only take the first part of the name. --- netclient/main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/netclient/main.go b/netclient/main.go index dece9fcc..152bc312 100644 --- a/netclient/main.go +++ b/netclient/main.go @@ -10,6 +10,7 @@ import ( "os/signal" "runtime/debug" "strconv" + "strings" "syscall" "github.com/gravitl/netmaker/netclient/command" @@ -30,6 +31,7 @@ func main() { if err != nil { hostname = "" } + hostname = strings.Split(hostname, ".")[0] cliFlags := []cli.Flag{ &cli.StringFlag{