Skip to content

Commit

Permalink
add comment for installed_version
Browse files Browse the repository at this point in the history
  • Loading branch information
kbukum1 committed Nov 15, 2024
1 parent 2d28e6a commit 253384c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions npm_and_yarn/lib/dependabot/npm_and_yarn/package_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,10 @@ def install(name, version)
Dependabot.logger.info("Installed version of #{name}: #{installed_version(name)}")
end

# Retrieve the installed version of the package manager by executing
# the "<name> --version" command and using the output.
# If the output does not match the expected version format (PACKAGE_MANAGER_VERSION_REGEX),
# fall back to the version inferred from the dependency files.
sig { params(name: T.nilable(String)).returns(String) }
def installed_version(name)
# Return the memoized version if it has already been computed
Expand Down

0 comments on commit 253384c

Please sign in to comment.