Skip to content

Commit f8e9567

Browse files
committed
Update list-cli-tool.ps1
1 parent 68eac50 commit f8e9567

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Scripts/list-cli-tools.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
Author: Markus Fleschutz | License: CC0
1717
#>
1818

19-
function ListTool { param([string]$Cmd, [string]$VersionArg)
19+
function ListTool { param([string]$Name, [string]$VersionArg)
2020
try {
21-
$Info = Get-Command $Cmd -ErrorAction Stop
21+
$Info = Get-Command $Name -ErrorAction Stop
2222
$Path = $Info.Source
2323
if ("$($Info.Version)" -eq "0.0.0.0") {
2424
if ("$VersionArg" -ne "") {
@@ -37,11 +37,11 @@ function ListTool { param([string]$Cmd, [string]$VersionArg)
3737
$Version = $Info.Version
3838
}
3939
if (Test-Path "$Path" -pathType leaf) {
40-
$FileSize = (Get-Item "$Path").Length
40+
$Size = (Get-Item "$Path").Length
4141
} else {
42-
$FileSize = "0"
42+
$Size = 0
4343
}
44-
New-Object PSObject -Property @{ Tool=$Cmd; Version=$Version; Path=$Path; FileSize=$FileSize }
44+
New-Object PSObject -Property @{ Tool=$Name; Version=$Version; Path=$Path; FileSize=$Size }
4545
} catch {
4646
return
4747
}

0 commit comments

Comments
 (0)