mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-27 04:11:03 +00:00
Seems like folks keep adding a trailing / to the DRONE_SERVER env. This should remove it if it exists and not worry if it doesn't
This commit is contained in:
parent
e0b7b31a5d
commit
c884a9f210
1 changed files with 2 additions and 1 deletions
|
@ -13,6 +13,7 @@ import (
|
||||||
|
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"github.com/codegangsta/cli"
|
"github.com/codegangsta/cli"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AgentCmd is the exported command for starting the drone agent.
|
// AgentCmd is the exported command for starting the drone agent.
|
||||||
|
@ -157,7 +158,7 @@ func start(c *cli.Context) {
|
||||||
)
|
)
|
||||||
|
|
||||||
client := client.NewClientToken(
|
client := client.NewClientToken(
|
||||||
c.String("drone-server"),
|
strings.TrimRight(c.String("drone-server"),"/"),
|
||||||
accessToken,
|
accessToken,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue