Skip to content

Commit

Permalink
Fixed types in AgentExecStatus struct (#123)
Browse files Browse the repository at this point in the history
* Fixed types in AgentExecStatus struct

* Changed if stament to match type

* Fixed identation in types.go

---------

Co-authored-by: mperez <[email protected]>
  • Loading branch information
mperezd and mperez authored Mar 7, 2024
1 parent a6a1921 commit ae11add
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
2 changes: 1 addition & 1 deletion virtual_machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit ae11add

Please sign in to comment.