Skip to content

Add --clobber / --skip-existing to run download and release download#6053

Merged
samcoe merged 7 commits intocli:trunkfrom
satotake:add-clobber-skip-existing
Sep 1, 2022
Merged

Add --clobber / --skip-existing to run download and release download#6053
samcoe merged 7 commits intocli:trunkfrom
satotake:add-clobber-skip-existing

Conversation

@satotake
Copy link
Contributor

Fixes #2598

  • Add --clobber to run download
  • Add --clobber to release download
  • Add --skip-existing to run download
  • Add --skip-existing to release download

@satotake satotake requested a review from a team as a code owner August 10, 2022 14:21
@satotake satotake requested review from mislav and removed request for a team August 10, 2022 14:21
@cliAutomation cliAutomation added the external pull request originating outside of the CLI core team label Aug 10, 2022
@samcoe samcoe force-pushed the add-clobber-skip-existing branch from 9ec5547 to 8a00d54 Compare September 1, 2022 11:34
Copy link
Contributor

@samcoe samcoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@satotake Thanks for the contribution. I went ahead and added a couple commits on top of your work making slight modifications.

  1. I reduced the scope of the PR store just address release download since that is what was requested in the original issue.
  2. I changed the logic to only perform the download when we knew we would write the file or if download the release source archive, hopefully saving our users from downloading extra data that would just be discarded.

@samcoe samcoe enabled auto-merge (squash) September 1, 2022 11:50
@samcoe samcoe self-assigned this Sep 1, 2022
@samcoe samcoe merged commit e2f344f into cli:trunk Sep 1, 2022
scottclk added a commit to scottclk/cli that referenced this pull request Jan 29, 2025
This functionality already exists for release download.
It was initally added in the same PR
cli#6053 but the changes were overwritten by
a further commit.

Makes it possible to skip when the file already exists or overwriting existing files
when required.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external pull request originating outside of the CLI core team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

release download skip if file exists and exit without an error

3 participants