diff --git a/build.ps1 b/build.ps1 index ef11a59e..3815fcdd 100644 --- a/build.ps1 +++ b/build.ps1 @@ -22,6 +22,8 @@ param( $Configuration = "Debug" ) +#Requires -Version 6.0 + Import-Module "$PSScriptRoot/tools/helper.psm1" -Force # Bootstrap step @@ -107,10 +109,20 @@ if($Test.IsPresent) { throw "Cannot find 'git'. Please make sure it's in the 'PATH'." } - # Cmdlet help docs should be up-to-date - Update-MarkdownHelp -Path ./docs/cmdlets - $diff = git diff ./docs/cmdlets - if ($diff) { - throw "Cmdlet help docs are not up-to-date, run Update-MarkdownHelp.`n$diff`n" + # Cmdlet help docs should be up-to-date. + # PlatyPS needs the module to be imported. + Import-Module -Force (Join-Path $PSScriptRoot src Modules Microsoft.Azure.Functions.PowerShellWorker) + try { + # Update the help and diff the result. + $docsPath = Join-Path $PSScriptRoot docs cmdlets + Update-MarkdownHelp -Path $docsPath + $diff = git diff $docsPath + if ($diff) { + throw "Cmdlet help docs are not up-to-date, run Update-MarkdownHelp.`n$diff`n" + } + Write-Host "Help is up-to-date." + } finally { + # Clean up. + Remove-Module Microsoft.Azure.Functions.PowerShellWorker -Force } } diff --git a/docs/cmdlets/Get-OutputBinding.md b/docs/cmdlets/Get-OutputBinding.md index 6433549c..074a9eeb 100644 --- a/docs/cmdlets/Get-OutputBinding.md +++ b/docs/cmdlets/Get-OutputBinding.md @@ -57,7 +57,7 @@ Required: False Position: 1 Default value: * Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False +Accept wildcard characters: True ``` ### -Purge @@ -76,7 +76,7 @@ Accept wildcard characters: False ``` ### CommonParameters -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). +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). ## INPUTS diff --git a/docs/cmdlets/Push-OutputBinding.md b/docs/cmdlets/Push-OutputBinding.md index 297247c9..a8ef9976 100644 --- a/docs/cmdlets/Push-OutputBinding.md +++ b/docs/cmdlets/Push-OutputBinding.md @@ -138,7 +138,7 @@ Accept wildcard characters: False ``` ### CommonParameters -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). +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). ## INPUTS diff --git a/docs/cmdlets/Trace-PipelineObject.md b/docs/cmdlets/Trace-PipelineObject.md index a07ee2c5..220f22b7 100644 --- a/docs/cmdlets/Trace-PipelineObject.md +++ b/docs/cmdlets/Trace-PipelineObject.md @@ -47,7 +47,7 @@ Accept wildcard characters: False ``` ### CommonParameters -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). +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). ## INPUTS diff --git a/src/Modules/Microsoft.Azure.Functions.PowerShellWorker/Microsoft.Azure.Functions.PowerShellWorker.psm1 b/src/Modules/Microsoft.Azure.Functions.PowerShellWorker/Microsoft.Azure.Functions.PowerShellWorker.psm1 index 9f56538f..87368f1f 100644 --- a/src/Modules/Microsoft.Azure.Functions.PowerShellWorker/Microsoft.Azure.Functions.PowerShellWorker.psm1 +++ b/src/Modules/Microsoft.Azure.Functions.PowerShellWorker/Microsoft.Azure.Functions.PowerShellWorker.psm1 @@ -49,6 +49,7 @@ function Get-OutputBinding { [CmdletBinding()] param( [Parameter(ValueFromPipeline = $True, ValueFromPipelineByPropertyName = $True)] + [SupportsWildcards()] [string[]] $Name = '*',