Suffix YayConf.BuildDir with uid to avoid permission issues between different users
This commit is contained in:
1 parent
263b2facef
commit
b3826dbb18
1 file changed
+6
-1
+6
-1
@@ -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"
|
||||
|
||||
Reference in new issue
Block a user