summaryrefslogtreecommitdiffstats
path: root/cmd/cmd.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/cmd.go')
-rw-r--r--cmd/cmd.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/cmd.go b/cmd/cmd.go
index 1ca885a42b..d246d2599d 100644
--- a/cmd/cmd.go
+++ b/cmd/cmd.go
@@ -9,6 +9,7 @@ package cmd
import (
"errors"
"fmt"
+ "strings"
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/setting"
@@ -22,6 +23,10 @@ func argsSet(c *cli.Context, args ...string) error {
if !c.IsSet(a) {
return errors.New(a + " is not set")
}
+
+ if len(strings.TrimSpace(c.String(a))) == 0 {
+ return errors.New(a + " is required")
+ }
}
return nil
}