pivotal-cf / pivnet-cli

CLI to interact with Tanzu Network API V2 interface.
Apache License 2.0
34 stars 27 forks source link

Simple Feature request: don't create empty file if download fails. #33

Closed haydonryan closed 4 years ago

haydonryan commented 5 years ago

Hi there, Currently, if I run pivnet download-product-files ... and I haven't accepted the EULA for this release, the pivnet cli creates this file but leaves it as zero length.

For scripting, it would be better for this file not to be created instead of exist but be invalid. (so we can do an if it exists skip the download step).

Thanks in advance.

pivotal-ivan-wang commented 5 years ago

Downloading a zero length file seems like an incorrect behavior. Thanks for bringing this up. We have created a story to look into this.

haydonryan commented 5 years ago

Thanks Ivan

nedenwalker commented 4 years ago

@haydonryan Hey! Changes were made to ensure the zero length file does not exist after the cli fails to download. This includes the error that results from a EULA that has not previously been accepted.