Skip to content

Commit

Permalink
fix the bug related to empty package manager name (#10936)
Browse files Browse the repository at this point in the history
  • Loading branch information
kbukum1 authored Nov 14, 2024
1 parent 9036780 commit 03f1816
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion npm_and_yarn/lib/dependabot/npm_and_yarn/package_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,10 @@ def setup(name)

private

sig { params(name: String).returns(Ecosystem::VersionManager) }
sig { params(name: T.nilable(String)).returns(Ecosystem::VersionManager) }
def package_manager_by_name(name)
name = DEFAULT_PACKAGE_MANAGER if name.nil? || PACKAGE_MANAGER_CLASSES[name].nil?

package_manager_class = PACKAGE_MANAGER_CLASSES[name]

package_manager_class ||= PACKAGE_MANAGER_CLASSES[DEFAULT_PACKAGE_MANAGER]
Expand Down

0 comments on commit 03f1816

Please sign in to comment.