diff --git a/nuget/lib/dependabot/nuget/file_parser.rb b/nuget/lib/dependabot/nuget/file_parser.rb index 583cb5d5a09..d3395d796b1 100644 --- a/nuget/lib/dependabot/nuget/file_parser.rb +++ b/nuget/lib/dependabot/nuget/file_parser.rb @@ -21,13 +21,13 @@ class FileParser < Dependabot::FileParsers::Base def parse workspace_path = project_files.first&.directory return [] unless workspace_path - + return [] unless repo_contents_path # `workspace_path` is the only unique value here so we use it as the cache key cache = T.let(CacheManager.cache("file_parser.parse"), T::Hash[String, T::Array[Dependabot::Dependency]]) key = workspace_path cache[key] ||= begin # run discovery for the repo - NativeHelpers.run_nuget_discover_tool(repo_root: repo_contents_path, + NativeHelpers.run_nuget_discover_tool(repo_root: T.must(repo_contents_path), workspace_path: workspace_path, output_path: DiscoveryJsonReader.discovery_file_path, credentials: credentials) diff --git a/nuget/lib/dependabot/nuget/native_helpers.rb b/nuget/lib/dependabot/nuget/native_helpers.rb index 65515c6d28c..4047feb226d 100644 --- a/nuget/lib/dependabot/nuget/native_helpers.rb +++ b/nuget/lib/dependabot/nuget/native_helpers.rb @@ -91,7 +91,7 @@ def self.get_nuget_discover_tool_command(repo_root:, workspace_path:, output_pat sig do params( - repo_root: T.nilable(String), + repo_root: String, workspace_path: String, output_path: String, credentials: T::Array[Dependabot::Credential]