From f163101ea32310a4072e4c71197acc3c2844a0f3 Mon Sep 17 00:00:00 2001 From: mperez Date: Tue, 27 Feb 2024 14:37:12 +0100 Subject: [PATCH 1/3] Fixed types in AgentExecStatus struct --- types.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types.go b/types.go index cdd496b..3555bfc 100644 --- a/types.go +++ b/types.go @@ -913,10 +913,10 @@ type AgentOsInfo struct { } type AgentExecStatus struct { - Exited bool `json:"exited"` + Exited int `json:"exited"` ErrData string `json:"err-data"` ErrTruncated bool `json:"err-truncated"` - ExitCode int `json:"exit-code"` + ExitCode int `json:"exitcode"` OutData string `json:"out-data"` OutTruncated string `json:"out-truncated"` Signal bool `json:"signal"` From 997c276dd03a94b86fe1bdb33cccabf4e82d6e2e Mon Sep 17 00:00:00 2001 From: mperez Date: Thu, 29 Feb 2024 11:05:02 +0100 Subject: [PATCH 2/3] Changed if stament to match type --- virtual_machine.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virtual_machine.go b/virtual_machine.go index 56fa971..f684677 100644 --- a/virtual_machine.go +++ b/virtual_machine.go @@ -532,7 +532,7 @@ func (v *VirtualMachine) WaitForAgentExecExit(ctx context.Context, pid, seconds if err != nil { return nil, err } - if status.Exited { + if status.Exited != 0 { return status, nil } From 54ab62302b208b743c76eb0e73bd766c57cf9b9c Mon Sep 17 00:00:00 2001 From: mperez Date: Wed, 6 Mar 2024 08:16:11 +0100 Subject: [PATCH 3/3] Fixed identation in types.go --- types.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types.go b/types.go index 3555bfc..5ced0b7 100644 --- a/types.go +++ b/types.go @@ -913,7 +913,7 @@ type AgentOsInfo struct { } type AgentExecStatus struct { - Exited int `json:"exited"` + Exited int `json:"exited"` ErrData string `json:"err-data"` ErrTruncated bool `json:"err-truncated"` ExitCode int `json:"exitcode"`