allow for CUSTOM_DATA_DIRS variable
This commit is contained in:
10
tools.go
10
tools.go
@@ -256,10 +256,20 @@ func getAppDirs() []string {
|
|||||||
home := os.Getenv("HOME")
|
home := os.Getenv("HOME")
|
||||||
//xdgDataHome := os.Getenv("XDG_DATA_HOME")
|
//xdgDataHome := os.Getenv("XDG_DATA_HOME")
|
||||||
//xdgDataDirs := os.Getenv("XDG_DATA_DIRS")
|
//xdgDataDirs := os.Getenv("XDG_DATA_DIRS")
|
||||||
|
|
||||||
|
custom := os.Getenv("CUSTOM_DATA_DIRS")
|
||||||
|
|
||||||
if home != "" {
|
if home != "" {
|
||||||
|
if custom == "" {
|
||||||
dirs = append(dirs, filepath.Join(home, "/my_applications"))
|
dirs = append(dirs, filepath.Join(home, "/my_applications"))
|
||||||
|
} else {
|
||||||
|
dirs = append(dirs, filepath.Join(home, custom))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
log.Infof("App dirs: %v", dirs)
|
log.Infof("App dirs: %v", dirs)
|
||||||
|
|
||||||
var confirmedDirs []string
|
var confirmedDirs []string
|
||||||
|
|||||||
Reference in New Issue
Block a user