Skip to content

Commit 5d36eca

Browse files
committed
fix(envscan): should detect both of fs.ErrNotExists and exec.ErrNotFound
1 parent 61fc773 commit 5d36eca

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

envinspection/inspection.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ func inspectInstalledSoftware(ctx context.Context, module *model.Module) {
6464
pkgs, e := f(ctx)
6565
if e != nil {
6666
LOG.Warnf("Software inspection error(%s): %s, ", fn, e)
67-
if errors.Is(e, fs.ErrNotExist) {
67+
if errors.Is(e, fs.ErrNotExist) || errors.Is(e, exec.ErrNotFound) {
68+
LOG.Debug("Skipping command due to missing executable: ", fn)
6869
continue
6970
}
7071
var pError *exec.ExitError

0 commit comments

Comments
 (0)