Skip to content

Commit

Permalink
simplified example
Browse files Browse the repository at this point in the history
  • Loading branch information
ninmonkey committed Sep 5, 2023
1 parent e81e398 commit 1f4da70
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Pwsh/Native.Command/ExplicitNativeCommandParsing.ForBat.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ function bp4 {
)
if($UsingLegacy) {
$LastPSNative = $PSNativeCommandArgumentPassing
$PSNativeCommandArgumentPassing | Join-string -f 'was {0}' | write-verbose -verb
$PSNativeCommandArgumentPassing
| Join-string -f 'was {0}' | write-verbose -verb
# ....
$PSNativeCommandArgumentPassing =
$UsingStyle ?? [System.Management.Automation.NativeArgumentPassingStyle]::Legacy
$PSNativeCommandArgumentPassing | Join-string -f 'was {0}' | write-verbose -verb
[System.Management.Automation.NativeArgumentPassingStyle]::Legacy
$PSNativeCommandArgumentPassing
| Join-string -f 'was {0}' | write-verbose -verb
}
$items = @( $input )
$items ??= gci . -name -depth 2 -File
Expand All @@ -27,7 +29,8 @@ function bp4 {
if($UsingLegacy) {
$PSNativeCommandArgumentPassing = $LastPSNative
}
$PSNativeCommandArgumentPassing | Join-string -f 'was {0}' | write-verbose -verb
$PSNativeCommandArgumentPassing
| Join-string -f 'was {0}' | write-verbose -verb
}

function tryExplicit {
Expand Down

0 comments on commit 1f4da70

Please sign in to comment.