I know that you said that you don't want to modify functions, but I though my solution might be helpful to someone else in the future, so I will add it here :)
I came up with following approach to get common parameter value in function:
$ErrorAction = $PSCmdlet.MyInvocation.BoundParameters.ErrorAction
if ($null -eq $ErrorAction) {
$ErrorAction = $ErrorActionPreference
}
Then I have applied it to related function call:
Install-PackageProvider -Name $ProviderName -Force:$Force -ErrorAction $ErrorAction
Here is related commit in my repository:
https://github.com/gucu112/Gucu112.Powershell/commit/12969ac0657500bc992cb8d9669cefb52e99b0b7