From 56d92c4e745c3325b3abc30410306f1a9a71abc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edu=20G=C3=B3mez=20Escandell?= Date: Thu, 7 Mar 2024 16:54:54 +0100 Subject: [PATCH] Landcape install: Dont't create user when cloud-init file is sent --- windows-agent/internal/proservices/landscape/executor.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/windows-agent/internal/proservices/landscape/executor.go b/windows-agent/internal/proservices/landscape/executor.go index 9711bc79b..38db6ee0f 100644 --- a/windows-agent/internal/proservices/landscape/executor.go +++ b/windows-agent/internal/proservices/landscape/executor.go @@ -154,6 +154,10 @@ func (e executor) install(ctx context.Context, cmd *landscapeapi.Command_Install return err } + if cmd.GetCloudinit() == "" { + return nil + } + // TODO: The rest of this function will need to be rethought once cloud-init support exists. windowsUser, err := user.Current() if err != nil {