@@ -277,7 +277,7 @@ func validateToolName(toolName string) error {
277277 return nil
278278}
279279
280- func runToolByTooName (toolName string , workDirectory string , pathsToCheck []string , autoFix bool , outputFile string , outputFormat string , tool * plugins.ToolInfo , runtime * plugins.RuntimeInfo ) error {
280+ func runToolByName (toolName string , workDirectory string , pathsToCheck []string , autoFix bool , outputFile string , outputFormat string , tool * plugins.ToolInfo , runtime * plugins.RuntimeInfo ) error {
281281 switch toolName {
282282 case "eslint" :
283283 binaryPath := runtime .Binaries [tool .Runtime ]
@@ -332,7 +332,12 @@ func runTool(workDirectory string, toolName string, pathsToCheck []string, outpu
332332 }
333333
334334 if tool == nil || ! isToolInstalled {
335- fmt .Println ("Tool configuration not found, adding and installing..." )
335+ if tool == nil {
336+ fmt .Println ("Tool configuration not found, adding and installing..." )
337+ }
338+ if ! isToolInstalled {
339+ fmt .Println ("Tool is not installed, installing..." )
340+ }
336341 err := config .InstallTool (toolName , tool , "" )
337342 if err != nil {
338343 return fmt .Errorf ("failed to install %s: %w" , toolName , err )
@@ -361,7 +366,7 @@ func runTool(workDirectory string, toolName string, pathsToCheck []string, outpu
361366 runtime = config .Config .Runtimes ()[tool .Runtime ]
362367 }
363368 }
364- return runToolByTooName (toolName , workDirectory , pathsToCheck , autoFix , outputFile , outputFormat , tool , runtime )
369+ return runToolByName (toolName , workDirectory , pathsToCheck , autoFix , outputFile , outputFormat , tool , runtime )
365370}
366371
367372var analyzeCmd = & cobra.Command {
0 commit comments