Skip to content

Commit 8ed2fc9

Browse files
BagToadCopilot
andcommitted
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 cli#8822 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 027adc7 commit 8ed2fc9

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

pkg/cmd/release/upload/upload.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ func NewCmdUpload(f *cmdutil.Factory, runF func(*UploadOptions) error) *cobra.Co
4343
4444
To define a display label for an asset, append text starting with %[1]s#%[1]s after the
4545
file name.
46+
47+
When using %[1]s--clobber%[1]s, existing assets are deleted before new assets are uploaded.
48+
If the upload fails, the original assets will be lost.
4649
`, "`"),
4750
Args: cobra.MinimumNArgs(2),
4851
RunE: func(cmd *cobra.Command, args []string) error {
@@ -66,7 +69,7 @@ func NewCmdUpload(f *cmdutil.Factory, runF func(*UploadOptions) error) *cobra.Co
6669
},
6770
}
6871

69-
cmd.Flags().BoolVar(&opts.OverwriteExisting, "clobber", false, "Overwrite existing assets of the same name")
72+
cmd.Flags().BoolVar(&opts.OverwriteExisting, "clobber", false, "Delete and re-upload existing assets of the same name")
7073

7174
return cmd
7275
}

0 commit comments

Comments
 (0)