mirror of
https://github.com/Jguer/yay
synced 2024-08-31 05:39:29 +00:00
Suffix YayConf.BuildDir with uid to avoid permission issues between different users
This commit is contained in:
parent
263b2facef
commit
b3826dbb18
|
@ -7,6 +7,7 @@ import (
|
|||
"net/http"
|
||||
"os"
|
||||
"os/exec"
|
||||
"os/user"
|
||||
"strings"
|
||||
|
||||
alpm "github.com/jguer/go-alpm"
|
||||
|
@ -119,7 +120,11 @@ func SaveConfig() error {
|
|||
}
|
||||
|
||||
func defaultSettings(config *Configuration) {
|
||||
config.BuildDir = "/tmp/yaytmp/"
|
||||
u, err := user.Current()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
config.BuildDir = fmt.Sprintf("/tmp/yaytmp-%s/", u.Uid)
|
||||
config.Editor = ""
|
||||
config.Devel = false
|
||||
config.MakepkgBin = "/usr/bin/makepkg"
|
||||
|
|
Loading…
Reference in a new issue