mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-23 18:31:00 +00:00
commit
9c2478bbda
1 changed files with 3 additions and 3 deletions
|
@ -526,18 +526,18 @@ func server(c *cli.Context) error {
|
||||||
|
|
||||||
// must configure the drone_host variable
|
// must configure the drone_host variable
|
||||||
if c.String("server-host") == "" {
|
if c.String("server-host") == "" {
|
||||||
logrus.Fatalln("DRONE_HOST is not properly configured")
|
logrus.Fatalln("DRONE_HOST/DRONE_SERVER_HOST is not properly configured")
|
||||||
}
|
}
|
||||||
|
|
||||||
if !strings.Contains(c.String("server-host"), "://") {
|
if !strings.Contains(c.String("server-host"), "://") {
|
||||||
logrus.Fatalln(
|
logrus.Fatalln(
|
||||||
"DRONE_HOST must be <scheme>://<hostname> format",
|
"DRONE_HOST/DRONE_SERVER_HOST must be <scheme>://<hostname> format",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
if strings.HasSuffix(c.String("server-host"), "/") {
|
if strings.HasSuffix(c.String("server-host"), "/") {
|
||||||
logrus.Fatalln(
|
logrus.Fatalln(
|
||||||
"DRONE_HOST must not have trailing slash",
|
"DRONE_HOST/DRONE_SERVER_HOST must not have trailing slash",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue