Skip to content

Commit

Permalink
fix(sca): Generate dependency for ruby-*-base instead of ruby-*
Browse files Browse the repository at this point in the history
Ruby is being modified to be coinstallable across versions. To avoid
different versions of Ruby from clashing, we need to generate a
dependency on ruby-*-base instead of ruby-*

Signed-off-by: RJ Sampson <[email protected]>
  • Loading branch information
EyeCantCU committed Dec 3, 2024
1 parent c4d3be2 commit 61f5d81
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/sca/sca.go
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ func generatePythonDeps(ctx context.Context, hdl SCAHandle, generated *config.De
return nil
}

// generateRubyDeps generates a ruby-X.Y dependency for packages which ship
// generateRubyDeps generates a ruby-X.Y-base dependency for packages which ship
// Ruby gems.
func generateRubyDeps(ctx context.Context, hdl SCAHandle, generated *config.Dependencies) error {
log := clog.FromContext(ctx)
Expand Down Expand Up @@ -590,8 +590,8 @@ func generateRubyDeps(ctx context.Context, hdl SCAHandle, generated *config.Depe
}
}

log.Infof(" found ruby gem, generating ruby-%s dependency", rubyGemVer)
generated.Runtime = append(generated.Runtime, fmt.Sprintf("ruby-%s", rubyGemVer))
log.Infof(" found ruby gem, generating ruby-%s-base dependency", rubyGemVer)
generated.Runtime = append(generated.Runtime, fmt.Sprintf("ruby-%s-base", rubyGemVer))

return nil
}
Expand Down

0 comments on commit 61f5d81

Please sign in to comment.