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