SharpeRAD / Cake.Powershell

Powershell addin for Cake
http://cakebuild.net
MIT License
83 stars 37 forks source link

Write-host inside function not printed in output. #62

Closed nikhilagrawaldotnet closed 6 years ago

nikhilagrawaldotnet commented 6 years ago

I have a ps script

function test
{
   #REM Do some work...
    Write-host "test"
}

test
Write-host "Main" 

and am invoking it from cake like

Task("InvokeFoo")
.Does(() =>
{
    StartPowershellScript(@".\..\foo", args =>
        {
            args.Append("fooarg", "itsvalue");
        });
});

In the output I only get "Main" and never get "test" eventhough.

If I invoke powershell from cmd prompt or ps promt, I get outputs in the same order they are executed.

Main test

Is there something that I am missing?

nikhilagrawaldotnet commented 6 years ago

Sorted.