Add mode default as a valid set value for progress-format flag (#472)

Manually tested `progress-format` works fine for all three modes
This commit is contained in:
shreyas-goenka 2023-06-14 13:26:56 +02:00 committed by GitHub
parent a17876480a
commit 3d03df8844
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -33,6 +33,11 @@ func (p *ProgressLogFormat) Set(s string) error {
*p = ProgressLogFormat(ModeInplace.String()) *p = ProgressLogFormat(ModeInplace.String())
case ModeJson.String(): case ModeJson.String():
*p = ProgressLogFormat(ModeJson.String()) *p = ProgressLogFormat(ModeJson.String())
case ModeDefault.String():
// We include ModeDefault here for symmetry reasons so this flag value
// can be unset after test runs. We should not point this value in error
// messages though since it's internal only
*p = ProgressLogFormat(ModeJson.String())
default: default:
valid := []string{ valid := []string{
ModeAppend.String(), ModeAppend.String(),