mirror of
https://github.com/Jguer/yay
synced 2024-10-31 04:12:51 +00:00
Suffix YayConf.BuildDir with uid to avoid permission issues between different users
This commit is contained in:
parent
263b2facef
commit
b3826dbb18
1 changed files with 6 additions and 1 deletions
|
@ -7,6 +7,7 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
|
"os/user"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
alpm "github.com/jguer/go-alpm"
|
alpm "github.com/jguer/go-alpm"
|
||||||
|
@ -119,7 +120,11 @@ func SaveConfig() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func defaultSettings(config *Configuration) {
|
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.Editor = ""
|
||||||
config.Devel = false
|
config.Devel = false
|
||||||
config.MakepkgBin = "/usr/bin/makepkg"
|
config.MakepkgBin = "/usr/bin/makepkg"
|
||||||
|
|
Loading…
Reference in a new issue