dwalker3rd / Overwatch

GNU General Public License v3.0
3 stars 0 forks source link

./definitions.ps1 -minimumdefinitions only loads Overwatch Vault; should load the 1password provider if installed #46

Open dwalker3rd opened 11 months ago

dwalker3rd commented 11 months ago

since 1Password is a provider, it's not currently loaded when calling definitions.ps1 with -minimumdefinitions. need it to be loaded, if installed.

dwalker3rd commented 10 months ago

added a new flag to the installation section for catalog objects: AlwaysLoad. This is specifically to identify providers that should be loaded by definitions.ps1 when calling it wtih -minimumdefinitions.

if ($MinimumDefinitions) { 
    $providers = Get-Provider -ResetCache | Where-Object {$_.Installed -and $_.Installation.Flag -contains "AlwaysLoad"}
    $providers.Id | ForEach-Object {
        if (Test-Path -Path "$($global:Location.Providers)\provider-$($_).ps1") {
            $null = . "$($global:Location.Providers)\provider-$($_).ps1"
        }
    }
    return
}