Skip to content

Commit f83e4ff

Browse files
committed
update PS samples
1 parent c377fdf commit f83e4ff

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

samples/client/echo_api/powershell/Build.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ function Get-FunctionsToExport {
4646
}
4747

4848
$ScriptDir = Split-Path $script:MyInvocation.MyCommand.Path
49-
$FunctionPath = 'Api', 'Model', 'Client' | ForEach-Object {Join-Path "$ScriptDir\src\PSOpenAPITools\" $_}
49+
$FunctionPath = 'Api', 'Model', 'Client' | Where-Object {
50+
Join-Path "$ScriptDir\src\PSOpenAPITools\" $_ | Test-Path
51+
} | ForEach-Object { Join-Path "$ScriptDir\src\PSOpenAPITools\" $_ }
5052

5153
$Manifest = @{
5254
Path = "$ScriptDir\src\PSOpenAPITools\PSOpenAPITools.psd1"

samples/client/echo_api/powershell/src/PSOpenAPITools/PSOpenAPITools.psm1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ $Script:Configuration = [System.Collections.HashTable]@{}
2424

2525
$Script:CmdletBindingParameters = @('Verbose','Debug','ErrorAction','WarningAction','InformationAction','ErrorVariable','WarningVariable','InformationVariable','OutVariable','OutBuffer','PipelineVariable')
2626

27-
'Api', 'Model', 'Client', 'Private' | Get-ChildItem -Path {
27+
'Api', 'Model', 'Client', 'Private' | Where-Object {
28+
Join-Path $PSScriptRoot $_ | Test-Path
29+
} | Get-ChildItem -Path {
2830
Join-Path $PSScriptRoot $_
2931
} -Filter '*.ps1' | ForEach-Object {
3032
Write-Debug "Importing file: $($_.BaseName)"

0 commit comments

Comments
 (0)