Add support for SecretManagement and SecretStore providers, enhance configuration data handling, and introduce new utility functions
This commit is contained in:
25
Private/Resolve-ConfigurationDataProviderSettingsPath.ps1
Normal file
25
Private/Resolve-ConfigurationDataProviderSettingsPath.ps1
Normal file
@@ -0,0 +1,25 @@
|
||||
function Resolve-ConfigurationDataProviderSettingsPath {
|
||||
[CmdletBinding()]
|
||||
Param(
|
||||
[Parameter(Mandatory=$true)]
|
||||
[string]
|
||||
$Provider,
|
||||
|
||||
[Parameter(Mandatory=$false)]
|
||||
[AllowEmptyString()]
|
||||
[string]
|
||||
$SettingsPath
|
||||
)
|
||||
|
||||
$FileName = "ProviderSettings.$Provider.psd1"
|
||||
|
||||
if([string]::IsNullOrWhiteSpace($SettingsPath)){
|
||||
return (Join-Path -Path (Get-Location).Path -ChildPath $FileName)
|
||||
}
|
||||
|
||||
if((Test-Path -Path $SettingsPath -PathType Container) -or $SettingsPath.EndsWith("\") -or $SettingsPath.EndsWith("/")){
|
||||
return (Join-Path -Path $SettingsPath -ChildPath $FileName)
|
||||
}
|
||||
|
||||
return $SettingsPath
|
||||
}
|
||||
Reference in New Issue
Block a user