Skip to content

Commit

Permalink
Update RulesetsLocation path from const
Browse files Browse the repository at this point in the history
Signed-off-by: Marek Aufart <[email protected]>
  • Loading branch information
aufi committed Oct 2, 2024
1 parent 7630c2a commit 36aba18
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/analyze-bin.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ func NewAnalyzeBinCmd(log logr.Logger) *cobra.Command {

func (b *analyzeBinCommand) Validate(ctx context.Context) error {
// Validate .kantra in home directory and its content (containerless)
requiredDirs := []string{b.homeKantraDir, filepath.Join(b.homeKantraDir, "rulesets"), filepath.Join(b.homeKantraDir, JavaBundlesLocation), filepath.Join(b.homeKantraDir, JDTLSBinLocation)}
requiredDirs := []string{b.homeKantraDir, filepath.Join(b.homeKantraDir, RulesetsLocation), filepath.Join(b.homeKantraDir, JavaBundlesLocation), filepath.Join(b.homeKantraDir, JDTLSBinLocation)}
for _, path := range requiredDirs {
if _, err := os.Stat(path); os.IsNotExist(err) {
b.log.Error(err, "cannot open required path, ensure that container-less dependencies are installed")
Expand Down Expand Up @@ -439,7 +439,7 @@ func (b *analyzeBinCommand) fetchLabels(ctx context.Context, listSources, listTa

func (b *analyzeBinCommand) walkRuleFilesForLabels(label string) ([]string, error) {
labelsSlice := []string{}
path := filepath.Join(b.homeKantraDir, "rulesets")
path := filepath.Join(b.homeKantraDir, RulesetsLocation)
if _, err := os.Stat(path); os.IsNotExist(err) {
b.log.Error(err, "cannot open provided path")
return nil, err
Expand Down

0 comments on commit 36aba18

Please sign in to comment.