Skip to content

Commit eb2c92a

Browse files
author
devizer
committed
Update $action [skip ci]
1 parent 4ffdc3a commit eb2c92a

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

Install-SqlServer-Version-Management.ps1

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Param(
44
)
55

66
$ModuleName = 'SqlServer-Version-Management';
7-
$ModuleVersion = '2.1.183';
7+
$ModuleVersion = '2.1.184';
88
$ModuleFiles = @(
99
@{
1010
FileName = 'SqlServer-Version-Management\SqlServer-Version-Management.psd1';
@@ -15,7 +15,7 @@ $ModuleFiles = @(
1515
" ModuleToProcess = @('SqlServer-Version-Management.psm1')",
1616
"",
1717
" # Version below is automatically incremented on build",
18-
" ModuleVersion = `"2.1.183`"",
18+
" ModuleVersion = `"2.1.184`"",
1919
"",
2020
" GUID = 'dd03b53d-575a-4056-ae08-e6dfea3384ea'",
2121
"",
@@ -4037,8 +4037,11 @@ $ModuleFiles = @(
40374037
"}",
40384038
"",
40394039
"# Include File: [\Includes.SqlServer\Try-Action-ForEach.ps1]",
4040-
"function Try-Action-ForEach([string] `$actionTitle, [ScriptBlock] `$action, [ScriptBlock] `$itemTitle) {",
4040+
"function Try-Action-ForEach([string] `$actionTitle, <# [ScriptBlock] #> `$action, [ScriptBlock] `$itemTitle) {",
40414041
" `$inputCopy = @(`$input)",
4042+
" if (`$action -is [string]) {",
4043+
" `$action = [scriptblock]::Create(`$action)",
4044+
" }",
40424045
" `$startAt = [System.Diagnostics.Stopwatch]::StartNew()",
40434046
" `$index = 0;",
40444047
" `$totalErrors=0;",

SqlServer-Version-Management.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3904,8 +3904,11 @@ Param(
39043904
}
39053905

39063906
# Include File: [\Includes.SqlServer\Try-Action-ForEach.ps1]
3907-
function Try-Action-ForEach([string] $actionTitle, [ScriptBlock] $action, [ScriptBlock] $itemTitle) {
3907+
function Try-Action-ForEach([string] $actionTitle, <# [ScriptBlock] #> $action, [ScriptBlock] $itemTitle) {
39083908
$inputCopy = @($input)
3909+
if ($action -is [string]) {
3910+
$action = [scriptblock]::Create($action)
3911+
}
39093912
$startAt = [System.Diagnostics.Stopwatch]::StartNew()
39103913
$index = 0;
39113914
$totalErrors=0;

0 commit comments

Comments
 (0)