Fix read credentials for ccm service

This commit is contained in:
世界
2025-10-21 21:21:49 +08:00
parent 0f5cda4169
commit 1c4614318e
3 changed files with 9 additions and 2 deletions

View File

@@ -32,6 +32,9 @@ func getRealUser() (*user.User, error) {
}
func getDefaultCredentialsPath() (string, error) {
if configDir := os.Getenv("CLAUDE_CONFIG_DIR"); configDir != "" {
return filepath.Join(configDir, ".credentials.json"), nil
}
userInfo, err := getRealUser()
if err != nil {
return "", err