Skip to content

Commit

Permalink
Not all fields in machine list were set properly
Browse files Browse the repository at this point in the history
When using custom output formats like table, some of the booleans
introduced for json format were not initialized correctly (wrong).

[NO TESTS NEEDED]

Signed-off-by: Anders F Björklund <[email protected]>
  • Loading branch information
afbjorklund committed Oct 8, 2021
1 parent bd4d9a0 commit 5caf6b9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/podman/machine/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,13 @@ func toHumanFormat(vms []*machine.ListResponse) ([]*machineReporter, error) {
response := new(machineReporter)
if vm.Name == cfg.Engine.ActiveService {
response.Name = vm.Name + "*"
response.Default = true
} else {
response.Name = vm.Name
}
if vm.Running {
response.LastUp = "Currently running"
response.Running = true
} else {
response.LastUp = units.HumanDuration(time.Since(vm.LastUp)) + " ago"
}
Expand Down

0 comments on commit 5caf6b9

Please sign in to comment.