Skip to content

Commit 89f8d77

Browse files
committed
fix: socket path
1 parent 93a0092 commit 89f8d77

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

internal/config/paths_darwin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ func AuditLogPath() string {
1616
}
1717

1818
func DefaultSocketPath() string {
19-
return "/var/run/keychain-auth/agent.sock"
19+
return filepath.Join(os.Getenv("HOME"), "Library", "Application Support", "keychain-auth", "agent.sock")
2020
}

internal/config/paths_linux.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,9 @@ func AuditLogPath() string {
2424
}
2525

2626
func DefaultSocketPath() string {
27-
return "/var/run/keychain-auth/agent.sock"
27+
runtimeDir := os.Getenv("XDG_RUNTIME_DIR")
28+
if runtimeDir == "" {
29+
runtimeDir = filepath.Join(os.Getenv("HOME"), ".cache")
30+
}
31+
return filepath.Join(runtimeDir, "keychain-auth", "agent.sock")
2832
}

keychain-auth

772 KB
Binary file not shown.

0 commit comments

Comments
 (0)