fix(bootstrap): include delete in config subcommand hint
This commit is contained in:
parent
17fe329ce9
commit
cae689d0e4
2 changed files with 11 additions and 1 deletions
|
|
@ -211,7 +211,14 @@ func trimArgs(args []string) []string {
|
|||
|
||||
func runConfigCommand(ctx context.Context, opts Options, args []string) error {
|
||||
if len(args) == 0 {
|
||||
return fmt.Errorf("%w: %s requires one of: %s, %s", ErrSubcommandRequired, CommandConfig, ConfigSubcommandShow, ConfigSubcommandTest)
|
||||
return fmt.Errorf(
|
||||
"%w: %s requires one of: %s, %s, %s",
|
||||
ErrSubcommandRequired,
|
||||
CommandConfig,
|
||||
ConfigSubcommandShow,
|
||||
ConfigSubcommandTest,
|
||||
ConfigSubcommandDelete,
|
||||
)
|
||||
}
|
||||
|
||||
subcommand := strings.TrimSpace(args[0])
|
||||
|
|
|
|||
|
|
@ -68,6 +68,9 @@ func TestRunReturnsCommandNotConfigured(t *testing.T) {
|
|||
if !errors.Is(err, ErrSubcommandRequired) {
|
||||
t.Fatalf("Run error = %v, want ErrSubcommandRequired", err)
|
||||
}
|
||||
if !strings.Contains(err.Error(), "show, test, delete") {
|
||||
t.Fatalf("Run error = %q, want mention of show, test, delete", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestRunPrintsVersionByDefault(t *testing.T) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue