Skip to content

Commit

Permalink
reverse the order to make bad directory tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
jakecoffman committed Feb 8, 2024
1 parent f36c04f commit e7acca0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions updater/lib/dependabot/dependency_snapshot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def initialize(job:, base_commit_sha:, dependency_files:)
@dependency_group_engine.assign_to_groups!(dependencies: allowed_dependencies)
end

return unless job.source.directory
return if job.source.directories

# Some settings when not doing multi-dir
@current_directory = T.must(job.source.directory)
Expand All @@ -164,10 +164,10 @@ def initialize(job:, base_commit_sha:, dependency_files:)
# Helper simplifies some of the logic, no need to check for one or the other!
sig { returns(T::Array[String]) }
def directories
if job.source.directory
[T.must(job.source.directory)]
else
if job.source.directories
T.must(job.source.directories)
else
[T.must(job.source.directory)]
end
end

Expand Down

0 comments on commit e7acca0

Please sign in to comment.