fix(scanner): parsing apt cache policy for nvidia-container-toolkit (#1786)

* fix(scanner): parsing apt cache policy for nvidia-container-toolkit

* fix testcase
This commit is contained in:
Sinclair
2023-11-13 13:49:17 +09:00
committed by GitHub
parent f3f8e26ba5
commit bced16fa9c
2 changed files with 24 additions and 1 deletions

View File

@@ -1106,7 +1106,7 @@ func (o *debian) parseAptCachePolicy(stdout, name string) (packCandidateVer, err
if isRepoline {
ss := strings.Split(strings.TrimSpace(line), " ")
if len(ss) == 5 {
if len(ss) == 5 || len(ss) == 4 {
ver.Repo = ss[2]
return ver, nil
}