Skip to content

Commit

Permalink
[CHANGED] Handle multiple solution files for nuget [#173021333]
Browse files Browse the repository at this point in the history
Signed-off-by: Debbie Chen <dechen@pivotal.io>
Signed-off-by: Parv Mital <pmital@pivotal.io>
  • Loading branch information
pivotal-pmital committed Jun 25, 2020
1 parent 3b775b9 commit 040d955
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion lib/license_finder/package_managers/nuget.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,18 @@ def prepare
end

def prepare_command
"#{package_management_command} restore"
cmd = package_management_command
sln_files = Dir['*.sln']
cmds = []
if sln_files.count > 1
sln_files.each do |sln|
cmds << "#{cmd} restore #{sln}"
end
else
cmds << "#{cmd} restore"
end

cmds.join('&&')
end

def installed?(logger = Core.default_logger)
Expand Down

0 comments on commit 040d955

Please sign in to comment.