mirror of
https://github.com/harness/drone.git
synced 2025-05-07 23:19:13 +08:00
Merge pull request #1756 from josmo/clean-trailing-slash
Remove the trailing / from DRONE_SERVER env in agent when it's there
This commit is contained in:
commit
a8e2dfd025
@ -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 New Issue
Block a user