From c884a9f210aafa68fff24ded6938029455238b33 Mon Sep 17 00:00:00 2001 From: Joachim Hill-Grannec Date: Fri, 12 Aug 2016 17:04:42 -0700 Subject: [PATCH] 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 --- drone/agent/agent.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drone/agent/agent.go b/drone/agent/agent.go index b2cbe80bd..9de665716 100644 --- a/drone/agent/agent.go +++ b/drone/agent/agent.go @@ -13,6 +13,7 @@ import ( "github.com/Sirupsen/logrus" "github.com/codegangsta/cli" + "strings" ) // AgentCmd is the exported command for starting the drone agent. @@ -157,7 +158,7 @@ func start(c *cli.Context) { ) client := client.NewClientToken( - c.String("drone-server"), + strings.TrimRight(c.String("drone-server"),"/"), accessToken, )