From 9593ea95f764b1119e3831109ec30029f3367b40 Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Wed, 23 Feb 2022 07:11:27 +1100 Subject: [PATCH] [linux] Fix discovery of npm, docker and upx (#1174) --- v2/internal/system/system_linux.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/v2/internal/system/system_linux.go b/v2/internal/system/system_linux.go index 5a08d96b7..b9d8b1fc9 100644 --- a/v2/internal/system/system_linux.go +++ b/v2/internal/system/system_linux.go @@ -23,6 +23,29 @@ func (i *Info) discover() error { if err != nil { return err } + for _, dep := range dependencies { + if dep.Name == "npm" { + locallyInstalled := checkNPM() + if locallyInstalled.Installed { + dep.Installed = true + dep.Version = locallyInstalled.Version + } + } + if dep.Name == "docker" { + locallyInstalled := checkDocker() + if locallyInstalled.Installed { + dep.Installed = true + dep.Version = locallyInstalled.Version + } + } + if dep.Name == "upx" { + locallyInstalled := checkUPX() + if locallyInstalled.Installed { + dep.Installed = true + dep.Version = locallyInstalled.Version + } + } + } i.Dependencies = dependencies }