SonarPrepTask is failing with version 6 and not failing with 7 it seems

When used 6 I am seeing following error:
##[warning]Error while executing SonarQube:Prepare task: [SQ] Unknown scanner mode: undefined

When I am using 7 no error in SonarQube prepare task a

why? it is same inputs and same code.

Hey there.

I suggest that, first things first, you share the complete Azure Pipelines YML where you’re facing this issue.

Hope you have seen template YAML i gave