From 1f4da708b21ded994478b06a61496b6f75f6008f Mon Sep 17 00:00:00 2001 From: Jake Bolton Date: Tue, 5 Sep 2023 18:26:22 -0500 Subject: [PATCH] simplified example --- .../ExplicitNativeCommandParsing.ForBat.ps1 | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Pwsh/Native.Command/ExplicitNativeCommandParsing.ForBat.ps1 b/Pwsh/Native.Command/ExplicitNativeCommandParsing.ForBat.ps1 index 1dfd09e..7d012b1 100644 --- a/Pwsh/Native.Command/ExplicitNativeCommandParsing.ForBat.ps1 +++ b/Pwsh/Native.Command/ExplicitNativeCommandParsing.ForBat.ps1 @@ -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 @@ -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 {