Skip to content

Commit

Permalink
fix/handle-no-ecosystem-case
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanpulver committed Jan 6, 2025
1 parent e892245 commit f6573db
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions safety/scan/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -737,8 +737,13 @@ def scan(ctx: typer.Context,
path, file_paths = scan_project_directory(file_finder, console)

# Step 4: Prepare metadata for analysis
target_ecosystems = ", ".join([member.value for member in ecosystems])
wait_msg = WAIT_MSG_ANALYZING_TARGETS.format(target_ecosystems)
if ecosystems:
target_ecosystems = ", ".join([member.value for member in ecosystems])
wait_msg = WAIT_MSG_ANALYZING_TARGETS.format(target_ecosystems)
else:
# Handle the case where no ecosystems are detected
target_ecosystems = "No ecosystems detected"
wait_msg = "Analyzing files and environments for security findings"

# Step 5: Initialize data structures and counters for analysis
files: List[FileModel] = []
Expand Down

0 comments on commit f6573db

Please sign in to comment.