One problem is if your global config has preferred-install set, the first resolution above will set preferDist or preferSource to true, then here the local project config will be ignored even though it should override the global config. I think the only way is to forward the Input so you can check if it's set in the input here.