111
This commit is contained in:
+13
-1
@@ -2,11 +2,23 @@
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[switch]$UpdateConfig,
|
||||
[string]$ConfigPath = (Join-Path $PSScriptRoot 'appsettings.Development.json')
|
||||
[string]$ConfigPath
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
if ([string]::IsNullOrWhiteSpace($ConfigPath)) {
|
||||
$scriptDirectory = $PSScriptRoot
|
||||
if ([string]::IsNullOrWhiteSpace($scriptDirectory) -and
|
||||
-not [string]::IsNullOrWhiteSpace($MyInvocation.MyCommand.Path)) {
|
||||
$scriptDirectory = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||
}
|
||||
if ([string]::IsNullOrWhiteSpace($scriptDirectory)) {
|
||||
throw 'Cannot determine the script directory. Specify -ConfigPath with the full config path.'
|
||||
}
|
||||
$ConfigPath = Join-Path $scriptDirectory 'appsettings.Development.json'
|
||||
}
|
||||
|
||||
function ConvertTo-EncryptedValue {
|
||||
param(
|
||||
[Security.SecureString]$Value,
|
||||
|
||||
Reference in New Issue
Block a user