Skip to content

Commit a536170

Browse files
committed
fix(config/socket): add host to temp dir name
1 parent 5f88697 commit a536170

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

config.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ func DefaultSocket() (string, error) {
5555
return "", err
5656
}
5757

58+
hostname, err := os.Hostname()
59+
if err != nil {
60+
return "", err
61+
}
62+
5863
// Build candidate directories in priority order.
5964
candidates := []string{}
6065
subdir := "pago"
@@ -85,7 +90,7 @@ func DefaultSocket() (string, error) {
8590
// If no candidate exists, fall back to the temporary directory.
8691
if runtimeDir == "" {
8792
runtimeDir = os.TempDir()
88-
subdir = "pago-" + currentUser.Username
93+
subdir = "pago-" + currentUser.Username + "-" + hostname
8994
}
9095

9196
return filepath.Join(runtimeDir, subdir, "socket"), nil

0 commit comments

Comments
 (0)