Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc189fc5

Browse files
authored
fix: using a trailing slash on login url (#1622)
1 parentce7bf0b commitc189fc5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎cli/login.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"os"
99
"os/exec"
1010
"os/user"
11+
"path"
1112
"runtime"
1213
"strings"
1314

@@ -171,7 +172,9 @@ func login() *cobra.Command {
171172
sessionToken,_:=cmd.Flags().GetString(varToken)
172173
ifsessionToken=="" {
173174
authURL:=*serverURL
174-
authURL.Path=serverURL.Path+"/cli-auth"
175+
// Don't use filepath.Join, we don't want to use the os separator
176+
// for a url.
177+
authURL.Path=path.Join(serverURL.Path,"/cli-auth")
175178
iferr:=openURL(cmd,authURL.String());err!=nil {
176179
_,_=fmt.Fprintf(cmd.OutOrStdout(),"Open the following in your browser:\n\n\t%s\n\n",authURL.String())
177180
}else {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp