Skip to content

Commit

Permalink
#9555:sorbet error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
raj-meka committed Apr 26, 2024
1 parent 30860e6 commit 0609af1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions nuget/lib/dependabot/nuget/file_parser.rb
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion nuget/lib/dependabot/nuget/native_helpers.rb
Expand Up @@ -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]
Expand Down

0 comments on commit 0609af1

Please sign in to comment.