Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions commands/audit/audit.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,9 @@ func (auditCmd *AuditCommand) Run() (err error) {
if len(auditCmd.workingDirs) > 1 {
return errors.New("the 'audit' command with the 'Xray lib' BOM generator supports only one working directory. Please provide a single working directory")
}
} else {
// If no workingDirs were provided by the user, we apply a recursive scan on the root repository
} else if utils.IsScanRequested(utils.SourceCode, utils.ScaScan, auditCmd.ScansToPerform()...) || auditCmd.IncludeSbom {
// Only in case of SCA scan / SBOM requested and if no workingDirs were provided by the user
// We apply a recursive scan on the root repository
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the second comment the first one understands the why the code itself explains the what

isRecursiveScan = len(auditCmd.workingDirs) == 0
}
workingDirs, err := coreutils.GetFullPathsWorkingDirs(auditCmd.workingDirs)
Expand Down
Loading