File tree Expand file tree Collapse file tree 1 file changed +1
-17
lines changed
src/Cli/dotnet/Commands/Tool/Restore Expand file tree Collapse file tree 1 file changed +1
-17
lines changed Original file line number Diff line number Diff line change @@ -109,23 +109,7 @@ private static bool ManifestCommandMatchesActualInPackage(
109109 IReadOnlyList < ToolCommand > toolPackageCommands )
110110 {
111111 ToolCommandName [ ] commandsFromPackage = [ .. toolPackageCommands . Select ( t => t . Name ) ] ;
112- foreach ( var command in commandsFromManifest )
113- {
114- if ( ! commandsFromPackage . Contains ( command ) )
115- {
116- return false ;
117- }
118- }
119-
120- foreach ( var command in commandsFromPackage )
121- {
122- if ( ! commandsFromManifest . Contains ( command ) )
123- {
124- return false ;
125- }
126- }
127-
128- return true ;
112+ return ! commandsFromManifest . Any ( cmd => ! commandsFromPackage . Contains ( cmd ) ) && ! commandsFromPackage . Any ( cmd => ! commandsFromManifest . Contains ( cmd ) ) ;
129113 }
130114
131115 public bool PackageHasBeenRestored (
You can’t perform that action at this time.
0 commit comments