1
0
This commit is contained in:
dump_stack() 2023-05-13 09:09:29 +00:00
parent 599ce03ca4
commit 9b987bcc82
Signed by: dump_stack
GPG Key ID: BE44DA8C062D87DC

View File

@ -2,7 +2,6 @@ package debian
import ( import (
"errors" "errors"
"os/user"
"regexp" "regexp"
"strconv" "strconv"
"strings" "strings"
@ -128,13 +127,7 @@ var (
func MatchImagePkg(km config.KernelMask) (pkgs []string, err error) { func MatchImagePkg(km config.KernelMask) (pkgs []string, err error) {
if CachePath == "" { if CachePath == "" {
var usr *user.User CachePath = config.File("debian.cache")
usr, err = user.Current()
if err != nil {
return
}
CachePath = usr.HomeDir + "/.out-of-tree/debian.cache"
log.Debug().Msgf("Use default kernels cache path: %s", CachePath) log.Debug().Msgf("Use default kernels cache path: %s", CachePath)
} else { } else {
log.Debug().Msgf("Debian kernels cache path: %s", CachePath) log.Debug().Msgf("Debian kernels cache path: %s", CachePath)