File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -198,7 +198,7 @@ func executePowerShell(
198
198
199
199
if config .RemovePowerShellPrompt && ! strings .Contains (command , "function prompt" ) {
200
200
// hacky way of getting rid of powershell prompt
201
- command = PowerShellPromptOverride + "\n " + command
201
+ command = PowerShellPromptOverride + "\n " + command + " \n "
202
202
}
203
203
204
204
cmd = exec .Command (config .TargetRunner , config .PrimaryArgs ... )
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ func TestPowerShell01(t *testing.T) {
29
29
}
30
30
31
31
func TestPowerShell02 (t * testing.T ) {
32
+ //Write-Output ("ok" + $PSVersionTable.PSVersion.Major.ToString() + "`n`n" + $PSVersionTable.PSVersion)
32
33
result := ssg .RunPowerShell ("$PSVersionTable.PSVersion" )
33
34
result .PurifyPowerShellOutput ()
34
35
@@ -45,3 +46,10 @@ func TestPowerShell03(t *testing.T) {
45
46
46
47
log .Println (result .Stdout )
47
48
}
49
+
50
+ func TestPowerShell04 (t * testing.T ) {
51
+ result := ssg .RunPowerShell ("Write-Output (\" ok\" + $PSVersionTable.PSVersion.Major.ToString() + \" `n`n\" + $PSVersionTable.PSVersion)" )
52
+ result .PurifyPowerShellOutput ()
53
+
54
+ fmt .Println (result .Stdout )
55
+ }
You can’t perform that action at this time.
0 commit comments