Skip to content

Commit

Permalink
Fallback to NPM when package.json exists without a lockfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushn21 committed Oct 17, 2024
1 parent 47a891a commit 5cf2fd3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bridgetown-core/lib/bridgetown-core/plugin_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ def self.require_gem(name)
end

def self.package_manager
@package_manager ||= if File.exist?("package-lock.json")
"npm"
elsif File.exist?("yarn.lock")
@package_manager ||= if File.exist?("yarn.lock")
"yarn"
elsif File.exist?("pnpm-lock.yaml")
"pnpm"
elsif File.exist?("package.json")
"npm"
else
""
end
Expand Down

0 comments on commit 5cf2fd3

Please sign in to comment.