Skip to content

Commit

Permalink
Run yarn --version just once
Browse files Browse the repository at this point in the history
  • Loading branch information
deivid-rodriguez authored and jeffwidman committed Apr 26, 2023
1 parent 803ca3d commit 9d8333c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions npm_and_yarn/lib/dependabot/npm_and_yarn/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ def self.yarn_berry?(yarn_lock)
end

def self.yarn_major_version
@yarn_major_version ||= fetch_yarn_major_version
end

def self.fetch_yarn_major_version
output = SharedHelpers.run_shell_command("yarn --version")
Version.new(output).major
end
Expand Down

0 comments on commit 9d8333c

Please sign in to comment.