aboutsummaryrefslogtreecommitdiffstats
path: root/bridge
diff options
context:
space:
mode:
authorRemi Rampin <remi@rampin.org>2021-10-08 22:22:24 -0400
committerRemi Rampin <remi@rampin.org>2021-10-13 15:06:47 -0400
commitf50aea486bdb873d12b900dc767940c6bf34d7b8 (patch)
tree92691a02729fd55d9b30d43b3298763d23e6a8b9 /bridge
parent1eaf3ec0cb0de9de5bbf1d4f5131e22837740ec5 (diff)
downloadgit-bug-f50aea486bdb873d12b900dc767940c6bf34d7b8.tar.gz
Fix GitLab showing https:/../personal_access_token
Using path.Join() to concatenate URLs doesn't really make sense, and in particular will change "//" to "/".
Diffstat (limited to 'bridge')
-rw-r--r--bridge/gitlab/config.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/bridge/gitlab/config.go b/bridge/gitlab/config.go
index 3496b4a3..a8c3e673 100644
--- a/bridge/gitlab/config.go
+++ b/bridge/gitlab/config.go
@@ -3,7 +3,6 @@ package gitlab
import (
"fmt"
"net/url"
- "path"
"regexp"
"strconv"
"strings"
@@ -195,7 +194,7 @@ func promptTokenOptions(repo repository.RepoKeyring, login, baseUrl string) (aut
}
func promptToken(baseUrl string) (*auth.Token, error) {
- fmt.Printf("You can generate a new token by visiting %s.\n", path.Join(baseUrl, "profile/personal_access_tokens"))
+ fmt.Printf("You can generate a new token by visiting %s.\n", strings.TrimSuffix(baseUrl, "/")+"/profile/personal_access_tokens")
fmt.Println("Choose 'Create personal access token' and set the necessary access scope for your repository.")
fmt.Println()
fmt.Println("'api' access scope: to be able to make api calls")