mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 11:03:34 +00:00
client: refactor ListImages to return an error per machine
This commit is contained in:
@@ -102,6 +102,12 @@ func list(ctx context.Context, uncli *cli.CLI, opts listOptions) error {
|
||||
var rows []imageRow
|
||||
|
||||
for _, machineImages := range clusterImages {
|
||||
if err := machineImages.Error(); err != nil {
|
||||
tui.PrintWarning(fmt.Sprintf("failed to list images on machine '%s': %s",
|
||||
machineImages.Metadata.MachineName, err))
|
||||
continue
|
||||
}
|
||||
|
||||
// Get machine name for better readability.
|
||||
machineName := machineImages.Metadata.MachineName
|
||||
|
||||
|
||||
Reference in New Issue
Block a user