From aae0502742bf5e521fed5551ad53848ad756e10c Mon Sep 17 00:00:00 2001 From: Dharma-09 Date: Fri, 20 Sep 2024 15:44:01 -0300 Subject: [PATCH] updated changes --- ee/allowedcmd/cmd.go | 4 ++-- ee/tables/homebrew/upgradeable.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ee/allowedcmd/cmd.go b/ee/allowedcmd/cmd.go index 30866b305..c1bd225d2 100644 --- a/ee/allowedcmd/cmd.go +++ b/ee/allowedcmd/cmd.go @@ -34,7 +34,7 @@ func validatedCommand(ctx context.Context, knownPath string, arg ...string) (*ex // We expect to know the exact location for allowlisted commands on all // OSes except for a few Linux distros. if !allowSearchPath() { - return nil, fmt.Errorf("%w: %s",ErrCommandNotFound, knownPath) + return nil, fmt.Errorf("%w: %s", ErrCommandNotFound, knownPath) } cmdName := filepath.Base(knownPath) @@ -42,7 +42,7 @@ func validatedCommand(ctx context.Context, knownPath string, arg ...string) (*ex return newCmd(ctx, foundPath, arg...), nil } - return nil, fmt.Errorf("%w: %s and could not be located elsewhere", ErrCommandNotFound, knownPath) + return nil, fmt.Errorf("%w: not found at %s and could not be located elsewhere", ErrCommandNotFound, knownPath) } func allowSearchPath() bool { diff --git a/ee/tables/homebrew/upgradeable.go b/ee/tables/homebrew/upgradeable.go index 612fb115d..a8ce272f2 100644 --- a/ee/tables/homebrew/upgradeable.go +++ b/ee/tables/homebrew/upgradeable.go @@ -48,7 +48,7 @@ func (t *Table) generate(ctx context.Context, queryContext table.QueryContext) ( if err != nil { if errors.Is(err, allowedcmd.ErrCommandNotFound) { // No data, no error - return nil, nil + return nil, err } return nil, fmt.Errorf("failure allocating allowedcmd.Brew: %w", err) }