mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Add daily build non-windows platforms (#7683)
Add daily build non-windows platforms - Also, make the [Feature] tag work in VSTS for non-windows - Also, add a way to force feature tests to run - Also, fix an issue where `-workingdirectory` didn't work when running async
This commit is contained in:
@@ -160,6 +160,18 @@ namespace Microsoft.PowerShell
|
||||
ExecuteCommandAsyncHelper(tempPipeline, out exceptionThrown, options);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Executes a pipeline in the console when we are running asnyc.
|
||||
/// </summary>
|
||||
/// <param name="tempPipeline">
|
||||
/// The pipeline to execute.
|
||||
/// </param>
|
||||
/// <param name="exceptionThrown">
|
||||
/// Any exception thrown trying to run the pipeline.
|
||||
/// </param>
|
||||
/// <param name="options">
|
||||
/// The options to use to execute the pipeline.
|
||||
/// </param>
|
||||
internal void ExecuteCommandAsyncHelper(Pipeline tempPipeline, out Exception exceptionThrown, ExecutionOptions options)
|
||||
{
|
||||
Dbg.Assert(!_isPromptFunctionExecutor, "should not async invoke the prompt");
|
||||
@@ -192,7 +204,14 @@ namespace Microsoft.PowerShell
|
||||
|
||||
tempPipeline.Output.DataReady += new EventHandler(OutputObjectStreamHandler);
|
||||
tempPipeline.Error.DataReady += new EventHandler(ErrorObjectStreamHandler);
|
||||
PipelineFinishedWaitHandle waiterThereIsAFlyInMySoup = new PipelineFinishedWaitHandle(tempPipeline);
|
||||
PipelineFinishedWaitHandle pipelineWaiter = new PipelineFinishedWaitHandle(tempPipeline);
|
||||
|
||||
// close the input pipeline so the command will do something
|
||||
// if we are not reading input
|
||||
if ((options & Executor.ExecutionOptions.ReadInputObjects) == 0)
|
||||
{
|
||||
tempPipeline.Input.Close();
|
||||
}
|
||||
|
||||
tempPipeline.InvokeAsync();
|
||||
if ((options & ExecutionOptions.ReadInputObjects) > 0 && Console.IsInputRedirected)
|
||||
@@ -224,7 +243,7 @@ namespace Microsoft.PowerShell
|
||||
}
|
||||
tempPipeline.Input.Close();
|
||||
|
||||
waiterThereIsAFlyInMySoup.Wait();
|
||||
pipelineWaiter.Wait();
|
||||
|
||||
//report error if pipeline failed
|
||||
if (tempPipeline.PipelineStateInfo.State == PipelineState.Failed && tempPipeline.PipelineStateInfo.Reason != null)
|
||||
|
||||
Reference in New Issue
Block a user