vmware-labs / marketplace-cli

A CLI for interacting with the VMware Marketplace
Other
11 stars 2 forks source link

When downloading, if we need to pick a file, use a filename regex instead of uuid #71

Closed petewall closed 2 years ago

petewall commented 2 years ago

If we want to download a file and there are multiples, currently we require the user to pass the UUID of the file to download:

return fmt.Errorf("multiple charts found for %s %s, please use the --chart-id parameter", ChartProductSlug, version.Number)

This works fine for a one time event, but does not help with automation, as the UUIDs will change for every product.

Instead of --chart-id we should do something like --chart-name and try to match the filename to the parameter. This would persist across versions.

petewall commented 2 years ago

This has been fixed in the consolidated download command.