Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions cargo/lib/dependabot/cargo/file_fetcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,16 @@ def required_path?(file, path)
end
end

# Paths specified for workspace-wide dependencies
workspace = parsed_file(file).fetch("workspace", {})
workspace.fetch("dependencies", {}).each do |_, details|
next unless details.is_a?(Hash)
next unless details["path"]
next unless path == File.join(details["path"], "Cargo.toml")

return true if details["git"].nil?
end

# Paths specified as replacements
parsed_file(file).fetch("replace", {}).each do |_, details|
next unless details.is_a?(Hash)
Expand Down