Clarify --clobber flag deletes assets before re-uploading
Update the help text and flag description for `gh release upload --clobber` to make it clear that existing assets are deleted before new ones are uploaded, and that original assets will be lost if the upload fails. Fixes #8822 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
027adc7bf5
commit
8ed2fc913c
1 changed files with 4 additions and 1 deletions
|
|
@ -43,6 +43,9 @@ func NewCmdUpload(f *cmdutil.Factory, runF func(*UploadOptions) error) *cobra.Co
|
|||
|
||||
To define a display label for an asset, append text starting with %[1]s#%[1]s after the
|
||||
file name.
|
||||
|
||||
When using %[1]s--clobber%[1]s, existing assets are deleted before new assets are uploaded.
|
||||
If the upload fails, the original assets will be lost.
|
||||
`, "`"),
|
||||
Args: cobra.MinimumNArgs(2),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
|
|
@ -66,7 +69,7 @@ func NewCmdUpload(f *cmdutil.Factory, runF func(*UploadOptions) error) *cobra.Co
|
|||
},
|
||||
}
|
||||
|
||||
cmd.Flags().BoolVar(&opts.OverwriteExisting, "clobber", false, "Overwrite existing assets of the same name")
|
||||
cmd.Flags().BoolVar(&opts.OverwriteExisting, "clobber", false, "Delete and re-upload existing assets of the same name")
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue