From 9901d6b2e74f563fb3edaf86249f756c148588fd Mon Sep 17 00:00:00 2001 From: bravechamp Date: Sun, 13 Mar 2022 21:10:41 +0000 Subject: [PATCH] Ability to clear nickname --- cmd/headscale/cli/nodes.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/headscale/cli/nodes.go b/cmd/headscale/cli/nodes.go index f0c4edea..868062e3 100644 --- a/cmd/headscale/cli/nodes.go +++ b/cmd/headscale/cli/nodes.go @@ -235,9 +235,13 @@ var renameNodeCmd = &cobra.Command{ defer cancel() defer conn.Close() + newName := "" + if len(args) > 0 { + newName = args[0] + } request := &v1.RenameMachineRequest{ MachineId: identifier, - NewName: args[0], + NewName: newName, } response, err := client.RenameMachine(ctx, request)