mirror of
https://github.com/psviderski/uncloud.git
synced 2026-10-06 13:18:58 +00:00
client: refactor ListImages to return an error per machine
This commit is contained in:
1 parent
d36ff67409
commit
7bac40ae3e
3 files changed
+21
-11
No files matched your search
@@ -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