File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed
src/Cli/dotnet/ToolPackage Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -52,15 +52,24 @@ public static ToolConfiguration Deserialize(string pathToXml)
5252 throw new ToolConfigurationException ( CommonLocalizableStrings . ToolSettingsMoreThanOneCommand ) ;
5353 }
5454
55- if ( dotNetCliTool . Commands [ 0 ] . Runner != "dotnet" )
55+ // if there is no runner, this could be an entirely different _kind_ of tool.
56+ if ( string . IsNullOrWhiteSpace ( dotNetCliTool . Commands [ 0 ] . Runner ) )
5657 {
57- throw new ToolConfigurationException (
58- string . Format (
59- CommonLocalizableStrings . ToolSettingsUnsupportedRunner ,
60- dotNetCliTool . Commands [ 0 ] . Name ,
61- dotNetCliTool . Commands [ 0 ] . Runner ) ) ;
58+ if ( warnings . Count != 0 )
59+ {
60+ throw new ToolConfigurationException ( warnings [ 0 ] ) ;
61+ }
6262 }
6363
64+ if ( dotNetCliTool . Commands [ 0 ] . Runner != "dotnet" )
65+ {
66+ throw new ToolConfigurationException (
67+ string . Format (
68+ CommonLocalizableStrings . ToolSettingsUnsupportedRunner ,
69+ dotNetCliTool . Commands [ 0 ] . Name ,
70+ dotNetCliTool . Commands [ 0 ] . Runner ) ) ;
71+ }
72+
6473 return new ToolConfiguration (
6574 dotNetCliTool . Commands [ 0 ] . Name ,
6675 dotNetCliTool . Commands [ 0 ] . EntryPoint ,
You can’t perform that action at this time.
0 commit comments