Skip to content

Commit c648928

Browse files
committed
fix: address VS warnings
- Rename Run-Tool -> Invoke-Tool - Replace use of with - Use Convert-ToolOutput in tool runner - Keep -Args support via [Alias('Args')]
1 parent 39f729b commit c648928

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

SystemTester.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ function Convert-ToolOutput {
268268
}
269269

270270
# Run tool
271-
function Run-Tool {
271+
function Invoke-Tool {
272272
param(
273273
[string]$ToolName,
274274
[Alias('Args')]
@@ -296,13 +296,13 @@ function Run-Tool {
296296
try {
297297
$start = Get-Date
298298
if ($ToolName -in @("psinfo","pslist","handle","autorunsc","testlimit","contig")) {
299-
$Args = "-accepteula $Args"
299+
$ArgumentList = "-accepteula $ArgumentList"
300300
}
301301

302-
$argArray = if ($Args.Trim()) { $Args.Split(' ') | Where-Object { $_ } } else { @() }
302+
$argArray = if ($ArgumentList.Trim()) { $ArgumentList.Split(' ') | Where-Object { $_ } } else { @() }
303303
$rawOutput = & $toolPath $argArray 2>&1 | Out-String
304304
$duration = ((Get-Date) - $start).TotalMilliseconds
305-
$cleanOutput = Clean-ToolOutput -ToolName $ToolName -RawOutput $rawOutput
305+
$cleanOutput = Convert-ToolOutput -ToolName $ToolName -RawOutput $rawOutput
306306

307307
$script:TestResults += @{
308308
Tool=$ToolName; Description=$Description

0 commit comments

Comments
 (0)