File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
reference/5.1/Microsoft.PowerShell.Core/About Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -175,19 +175,23 @@ function Get-FunctionPosition {
175
175
process {
176
176
try {
177
177
$filesToProcess = if ($_ -is [System.IO.FileSystemInfo]) {
178
+ Write-Verbose "From pipeline"
178
179
$_
179
180
} else {
180
- $filesToProcess = Get-Item -Path $Path
181
+ Write-Verbose "From parameter, $Path"
182
+ Get-Item -Path $Path
181
183
}
182
184
$parser = [System.Management.Automation.Language.Parser]
185
+ Write-Verbose "lets start the foreach loop on `$filesToProcess with $($filesToProcess.count) as count"
183
186
foreach ($item in $filesToProcess) {
187
+ Write-Verbose "$item"
184
188
if ($item.PSIsContainer -or
185
189
$item.Extension -notin @('.ps1', '.psm1')) {
186
190
continue
187
191
}
188
192
$tokens = $errors = $null
189
- $ast = $ parser::ParseFile($item.FullName, ([REF]$tokens),
190
- ([REF]$errors))
193
+ $parser::ParseFile($item.FullName, ([REF]$tokens),
194
+ ([REF]$errors)) | Out-Null
191
195
if ($errors) {
192
196
$msg = "File '{0}' has {1} parser errors." -f $item.FullName,
193
197
$errors.Count
You can’t perform that action at this time.
0 commit comments