Skip to content

Commit

Permalink
Merge branch 'main' into enh-codespell
Browse files Browse the repository at this point in the history
  • Loading branch information
abdulapopoola authored Jan 30, 2024
2 parents 5568c37 + ff9cd8d commit a95713f
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions nuget/lib/dependabot/nuget/native_helpers.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# typed: true
# frozen_string_literal: true

require "shellwords"

require_relative "nuget_config_credential_helpers"

module Dependabot
Expand All @@ -15,15 +17,16 @@ def self.native_helpers_root

def self.run_nuget_framework_check(project_tfms, package_tfms)
exe_path = File.join(native_helpers_root, "NuGetUpdater", "NuGetUpdater.Cli")
command = [
command_parts = [
exe_path,
"framework-check",
"--project-tfms",
*project_tfms,
"--package-tfms",
*package_tfms,
"--verbose"
].join(" ")
]
command = Shellwords.join(command_parts)

fingerprint = [
exe_path,
Expand All @@ -50,7 +53,7 @@ def self.run_nuget_framework_check(project_tfms, package_tfms)
# rubocop:disable Metrics/MethodLength
def self.run_nuget_updater_tool(repo_root:, proj_path:, dependency:, is_transitive:, credentials:)
exe_path = File.join(native_helpers_root, "NuGetUpdater", "NuGetUpdater.Cli")
command = [
command_parts = [
exe_path,
"update",
"--repo-root",
Expand All @@ -63,9 +66,11 @@ def self.run_nuget_updater_tool(repo_root:, proj_path:, dependency:, is_transiti
dependency.version,
"--previous-version",
dependency.previous_version,
is_transitive ? "--transitive" : "",
is_transitive ? "--transitive" : nil,
"--verbose"
].join(" ")
].compact

command = Shellwords.join(command_parts)

fingerprint = [
exe_path,
Expand All @@ -80,9 +85,9 @@ def self.run_nuget_updater_tool(repo_root:, proj_path:, dependency:, is_transiti
"<new-version>",
"--previous-version",
"<previous-version>",
is_transitive ? "--transitive" : "",
is_transitive ? "--transitive" : nil,
"--verbose"
].join(" ")
].compact.join(" ")

puts "running NuGet updater:\n" + command

Expand Down

0 comments on commit a95713f

Please sign in to comment.