Skip to content

Commit

Permalink
Remove trailing / in spacelift endpoint (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasmik authored Dec 20, 2022
1 parent 4ba3ee8 commit 255e0db
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/session/from_environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"net/http"
"os"
"strings"
)

const (
Expand Down Expand Up @@ -55,6 +56,7 @@ func FromEnvironment(ctx context.Context, client *http.Client) func(func(string)
}
fmt.Printf("Environment variable %q is deprecated, please use %q\n", EnvSpaceliftAPIEndpoint, EnvSpaceliftAPIKeyEndpoint)
}
endpoint = strings.TrimSuffix(endpoint, "/")

if gitHubToken, ok := lookup(EnvSpaceliftAPIGitHubToken); ok {
return FromGitHubToken(ctx, client)(endpoint, gitHubToken)
Expand Down

0 comments on commit 255e0db

Please sign in to comment.