File tree Expand file tree Collapse file tree 3 files changed +16
-4
lines changed Expand file tree Collapse file tree 3 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 44RootModule = ' PSNative.psm1'
55
66# Version number of this module.
7- ModuleVersion = ' 1.0.1 '
7+ ModuleVersion = ' 1.0.2 '
88
99# Supported PSEditions
1010# CompatiblePSEditions = @()
Original file line number Diff line number Diff line change 6767 }
6868 $info.WorkingDirectory = $resolved.Path
6969 }
70- foreach ($entry in $ArgumentList ) { $info.ArgumentList.Add ($entry ) }
70+ if ($global :PSVersionTable.PSVersion.Major -lt 6 ) {
71+ $info.UseShellExecute = $false
72+ $info.Arguments = $ArgumentList -join " "
73+ }
74+ else {
75+ foreach ($entry in $ArgumentList ) { $info.ArgumentList.Add ($entry ) }
76+ }
7177
7278 $info.RedirectStandardError = $true
7379 $info.RedirectStandardOutput = $true
7480
81+
7582 if ($Credential ) {
7683 $info.Password = $Credential.Password
7784 $networkCred = $Credential.GetNetworkCredential ()
Original file line number Diff line number Diff line change 3333 $info = [System.Diagnostics.ProcessStartInfo ]::new()
3434 $info.FileName = $this.Name
3535 if ($this.WorkingDirectory ) { $info.WorkingDirectory = $this.WorkingDirectory }
36- foreach ($entry in $this.ArgumentList ) { $info.ArgumentList.Add ($entry ) }
36+ if ($global :PSVersionTable.PSVersion.Major -lt 6 ) {
37+ $info.UseShellExecute = $false
38+ $info.Arguments = $this.ArgumentList -join " "
39+ }
40+ else {
41+ foreach ($entry in $this.ArgumentList ) { $info.ArgumentList.Add ($entry ) }
42+ }
3743
38- if ($global :PSVersionTable.PSVersion.Major -lt 6 ) { $info.UseShellExecute = $false }
3944 $info.RedirectStandardInput = $true
4045 $info.RedirectStandardError = $true
4146 $info.RedirectStandardOutput = $true
You can’t perform that action at this time.
0 commit comments