Powershell hangs when called from NAnt?

View: New views
1 Messages — Rating Filter:   Alert me  

Powershell hangs when called from NAnt?

by LLCard :: Rate this Message:

| View Threaded | Show Only this Message

We are calling powershell from Nant to execute a deploy script.  The script executes properly but it never returns after completion.  

I am calling this nant script from Bamboo but I have tried directly from the command line and it hangs as well.  Any ideas?   Thanks in advance.



        <target name="deployazurepackage" depends="azurepackage" >
                <echo message="Deploy Azure app with powershell calling deployOLHazure.ps1" />
                <exec failonerror="true" program="C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe" workingdir="${build.dir}\build" verbose="true" >
                        <arg value="-noprofile" />
                        <arg value="-nologo" />
                        <arg value="-noninteractive" />
                        <arg value="-command" />
                        <arg value="${build.dir}\build\deployOLHazure.ps1" />
                        <arg value="${Azure.package.dir}" />
                        <arg value="${Azure.packageName}" />
                        <arg value="${Azure.serviceConfig}" />
                        <arg value="${Azure.serviceName}" />
                        <arg value="${Azure.storageName}" />
                    <arg value=";exit $LASTEXITCODE" />
                </exec>
        </target>