File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1003,9 +1003,13 @@ private IEnumerable<string> GetFeeds(Func<IList<string>> getNugetFeeds)
10031003 // Add all explicitFeeds to the set of all feeds.
10041004 allFeeds . UnionWith ( explicitFeeds ) ;
10051005
1006+ // Obtain the list of feeds from the root source directory.
1007+ // If a NuGet file is present it will be respected, otherwise we will just get the machine/environment specific feeds.
1008+ var nugetFeedsFromRoot = GetFeeds ( ( ) => dotnet . GetNugetFeedsFromFolder ( fileProvider . SourceDir . FullName ) ) ;
1009+ allFeeds . UnionWith ( nugetFeedsFromRoot ) ;
1010+
10061011 if ( nugetConfigs . Count > 0 )
10071012 {
1008- // We don't have to get the feeds from each of the folders from below, it would be enought to check the folders that recursively contain the others.
10091013 var nugetConfigFeeds = nugetConfigs
10101014 . Select ( GetDirectoryName )
10111015 . Where ( folder => folder != null )
@@ -1014,12 +1018,6 @@ private IEnumerable<string> GetFeeds(Func<IList<string>> getNugetFeeds)
10141018
10151019 allFeeds . UnionWith ( nugetConfigFeeds ) ;
10161020 }
1017- else
1018- {
1019- // If we haven't found any `nuget.config` files, then obtain a list of feeds from the root source directory.
1020- var nugetFeedsFromRoot = GetFeeds ( ( ) => dotnet . GetNugetFeedsFromFolder ( fileProvider . SourceDir . FullName ) ) ;
1021- allFeeds . UnionWith ( nugetFeedsFromRoot ) ;
1022- }
10231021
10241022 logger . LogInfo ( $ "Found { allFeeds . Count } NuGet feeds (with inherited ones) in nuget.config files: { string . Join ( ", " , allFeeds . OrderBy ( f => f ) ) } ") ;
10251023
You can’t perform that action at this time.
0 commit comments