Skip to content

Commit

Permalink
fixed the version type
Browse files Browse the repository at this point in the history
  • Loading branch information
kbukum1 committed Nov 16, 2024
1 parent bcb2cf8 commit 9b1a441
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion npm_and_yarn/lib/dependabot/npm_and_yarn/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def self.run_single_yarn_command(command, fingerprint: nil)

# Install the package manager for specified version by using corepack
# and prepare it for use by using corepack
sig { params(name: String, version: Integer).void }
sig { params(name: String, version: String).void }
def self.install_package_manager(name, version)
SharedHelpers.run_shell_command(
"corepack install #{name}@#{version} --global --cache-only",
Expand Down
4 changes: 2 additions & 2 deletions npm_and_yarn/lib/dependabot/npm_and_yarn/package_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -260,14 +260,14 @@ def setup(name)
if version
raise_if_unsupported!(name, version)

Helpers.install_package_manager(name, version)
Helpers.install_package_manager(name, version.to_s)
else
version = guessed_version(name)

if version
raise_if_unsupported!(name, version.to_s)

Helpers.install_package_manager(name, version) if name == PNPMPackageManager::NAME
Helpers.install_package_manager(name, version.to_s) if name == PNPMPackageManager::NAME
end
end

Expand Down

0 comments on commit 9b1a441

Please sign in to comment.