fix debugging in vscode
This commit is contained in:
+9
-2
@@ -15,6 +15,10 @@ Directory for pre-write search-response backups.
|
||||
|
||||
.PARAMETER PageSize
|
||||
Number of rows requested per search page. All reported pages are retrieved.
|
||||
|
||||
.PARAMETER RunWhenDotSourced
|
||||
Runs the interactive workflow even when the script is dot-sourced. Intended for
|
||||
debuggers such as the VS Code PowerShell debugger that dot-source launch scripts.
|
||||
#>
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
@@ -28,7 +32,10 @@ param(
|
||||
|
||||
[Parameter()]
|
||||
[ValidateRange(1, 1000)]
|
||||
[int] $PageSize = 80
|
||||
[int] $PageSize = 80,
|
||||
|
||||
[Parameter()]
|
||||
[switch] $RunWhenDotSourced
|
||||
)
|
||||
|
||||
Set-StrictMode -Version Latest
|
||||
@@ -681,6 +688,6 @@ function Invoke-ElixFormsMetadataBulkUpdate {
|
||||
}
|
||||
}
|
||||
|
||||
if ($MyInvocation.InvocationName -ne '.') {
|
||||
if ($MyInvocation.InvocationName -ne '.' -or $RunWhenDotSourced) {
|
||||
Invoke-ElixFormsMetadataBulkUpdate -BaseUri $BaseUri -BackupDirectory $BackupDirectory -PageSize $PageSize
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user