Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions internal/runners/publish/publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,9 @@ func (r *Runner) Run(params *Params) error {
return locale.NewInputError("err_uploadingredient_file_not_found", "File not found: {{.V0}}", params.Filepath)
}
if !strings.HasSuffix(strings.ToLower(params.Filepath), ".zip") &&
!strings.HasSuffix(strings.ToLower(params.Filepath), ".tar.gz") {
return locale.NewInputError("err_uploadingredient_file_not_supported", "Expected file extension to be either .zip or .tar.gz: '{{.V0}}'", params.Filepath)
!strings.HasSuffix(strings.ToLower(params.Filepath), ".tar.gz") &&
!strings.HasSuffix(strings.ToLower(params.Filepath), ".whl") {
return locale.NewInputError("err_uploadingredient_file_not_supported", "Expected file extension: .zip, .tar.gz or .whl: '{{.V0}}'", params.Filepath)
}
} else if !params.Edit {
return locale.NewInputError("err_uploadingredient_file_required", "You have to supply the source archive unless editing.")
Expand Down
Loading