mirror of
https://github.com/daveberrys/guh.git
synced 2026-11-29 00:46:45 +08:00
fix platform not written
This commit is contained in:
1 parent
17b3d9fda5
commit
ed41c19bbf
1 file changed
+1
-1
@@ -20,7 +20,7 @@ func performAccountSwitch(username string) error {
|
|||||||
homeDir, err := os.UserHomeDir()
|
homeDir, err := os.UserHomeDir()
|
||||||
if err != nil { return err }
|
if err != nil { return err }
|
||||||
|
|
||||||
credentials := fmt.Sprintf("https://%s:%s@github.com\n", account.Username, account.ClassicToken)
|
credentials := fmt.Sprintf("https://%s:%s@%s\n", account.Username, account.ClassicToken, account.Platform)
|
||||||
if err := os.WriteFile(filepath.Join(homeDir, ".git-credentials"), []byte(credentials), 0600); err != nil { return err }
|
if err := os.WriteFile(filepath.Join(homeDir, ".git-credentials"), []byte(credentials), 0600); err != nil { return err }
|
||||||
|
|
||||||
fmt.Printf("Switched to account: %s\n", account.Username)
|
fmt.Printf("Switched to account: %s\n", account.Username)
|
||||||
|
|||||||
Reference in new issue
Block a user