mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-22 01:41:02 +00:00
Show error if secret name is missing (#4014)
This commit is contained in:
parent
c0b1d6aaa4
commit
107564f54c
1 changed files with 6 additions and 0 deletions
|
@ -16,6 +16,7 @@ package secret
|
|||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"html/template"
|
||||
"os"
|
||||
|
||||
|
@ -51,6 +52,11 @@ func secretInfo(ctx context.Context, c *cli.Command) error {
|
|||
secretName = c.String("name")
|
||||
format = c.String("format") + "\n"
|
||||
)
|
||||
|
||||
if secretName == "" {
|
||||
return fmt.Errorf("secret name is missing")
|
||||
}
|
||||
|
||||
client, err := internal.NewClient(ctx, c)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
Loading…
Reference in a new issue