Skip to content

Commit fa3dd6e

Browse files
Add SupportsWildcards to Get-OutputBinding and fix help test (#183)
* Add SupportsWildcards * enforce build and update doc * comments * bug fix from platyPS
1 parent 7ac8a34 commit fa3dd6e

File tree

5 files changed

+22
-9
lines changed

5 files changed

+22
-9
lines changed

build.ps1

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ param(
2222
$Configuration = "Debug"
2323
)
2424

25+
#Requires -Version 6.0
26+
2527
Import-Module "$PSScriptRoot/tools/helper.psm1" -Force
2628

2729
# Bootstrap step
@@ -107,10 +109,20 @@ if($Test.IsPresent) {
107109
throw "Cannot find 'git'. Please make sure it's in the 'PATH'."
108110
}
109111

110-
# Cmdlet help docs should be up-to-date
111-
Update-MarkdownHelp -Path ./docs/cmdlets
112-
$diff = git diff ./docs/cmdlets
113-
if ($diff) {
114-
throw "Cmdlet help docs are not up-to-date, run Update-MarkdownHelp.`n$diff`n"
112+
# Cmdlet help docs should be up-to-date.
113+
# PlatyPS needs the module to be imported.
114+
Import-Module -Force (Join-Path $PSScriptRoot src Modules Microsoft.Azure.Functions.PowerShellWorker)
115+
try {
116+
# Update the help and diff the result.
117+
$docsPath = Join-Path $PSScriptRoot docs cmdlets
118+
Update-MarkdownHelp -Path $docsPath
119+
$diff = git diff $docsPath
120+
if ($diff) {
121+
throw "Cmdlet help docs are not up-to-date, run Update-MarkdownHelp.`n$diff`n"
122+
}
123+
Write-Host "Help is up-to-date."
124+
} finally {
125+
# Clean up.
126+
Remove-Module Microsoft.Azure.Functions.PowerShellWorker -Force
115127
}
116128
}

docs/cmdlets/Get-OutputBinding.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Required: False
5757
Position: 1
5858
Default value: *
5959
Accept pipeline input: True (ByPropertyName, ByValue)
60-
Accept wildcard characters: False
60+
Accept wildcard characters: True
6161
```
6262
6363
### -Purge
@@ -76,7 +76,7 @@ Accept wildcard characters: False
7676
```
7777
7878
### CommonParameters
79-
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
79+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
8080
8181
## INPUTS
8282

docs/cmdlets/Push-OutputBinding.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ Accept wildcard characters: False
138138
```
139139
140140
### CommonParameters
141-
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
141+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
142142
143143
## INPUTS
144144

docs/cmdlets/Trace-PipelineObject.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Accept wildcard characters: False
4747
```
4848
4949
### CommonParameters
50-
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
50+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
5151
5252
## INPUTS
5353

src/Modules/Microsoft.Azure.Functions.PowerShellWorker/Microsoft.Azure.Functions.PowerShellWorker.psm1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ function Get-OutputBinding {
4949
[CmdletBinding()]
5050
param(
5151
[Parameter(ValueFromPipeline = $True, ValueFromPipelineByPropertyName = $True)]
52+
[SupportsWildcards()]
5253
[string[]]
5354
$Name = '*',
5455

0 commit comments

Comments
 (0)