Use /syft binary path when available, fall back to PATH lookup
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
40349d7573
commit
ae23eaad69
1 changed files with 6 additions and 1 deletions
|
|
@ -43,7 +43,12 @@ func Exec(ctx context.Context, args Args) error {
|
|||
cmdArgs = append(cmdArgs, "--source-version", sourceVersion)
|
||||
}
|
||||
|
||||
cmd := exec.CommandContext(ctx, "syft", cmdArgs...)
|
||||
syftBin := "syft"
|
||||
if _, err := os.Stat("/syft"); err == nil {
|
||||
syftBin = "/syft"
|
||||
}
|
||||
|
||||
cmd := exec.CommandContext(ctx, syftBin, cmdArgs...)
|
||||
cmd.Stdout = os.Stdout
|
||||
cmd.Stderr = os.Stderr
|
||||
trace(cmd)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue