From d758df9ca733f5f8b3adc2691d9276fdd426d905 Mon Sep 17 00:00:00 2001 From: Marek Aufart Date: Wed, 10 Jan 2024 17:05:23 +0100 Subject: [PATCH] :bug: Use RootCommandName for labels lookup (#138) Use RootCommandName for labels lookup Hardcoded `kantra` executable path could be different in other build environments, using Settings.RootCommandName to not depend on kantra name. Fixes: https://issues.redhat.com/browse/MTA-1998 Signed-off-by: Marek Aufart --- cmd/analyze.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/analyze.go b/cmd/analyze.go index c30cbd0..ad1afc4 100644 --- a/cmd/analyze.go +++ b/cmd/analyze.go @@ -293,7 +293,7 @@ func (a *analyzeCommand) ListLabels(ctx context.Context) error { ctx, WithEnv(runMode, runModeContainer), WithVolumes(volumes), - WithEntrypointBin("/usr/local/bin/kantra"), + WithEntrypointBin(fmt.Sprintf("/usr/local/bin/%s", Settings.RootCommandName)), WithEntrypointArgs(args...), WithCleanup(a.cleanup), )