mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
cleanup per andschwa comment
This commit is contained in:
@@ -499,21 +499,12 @@ namespace Microsoft.PowerShell.Linux.Host
|
||||
/// </summary>
|
||||
private void GetHistory(bool nested)
|
||||
{
|
||||
if (nested)
|
||||
using (Pipeline pipeline = nested
|
||||
? this.powershell.Runspace.CreateNestedPipeline("Get-History", true)
|
||||
: this.powershell.Runspace.CreatePipeline("Get-History"))
|
||||
{
|
||||
using (Pipeline pipelineNested = this.powershell.Runspace.CreateNestedPipeline("Get-History", true))
|
||||
{
|
||||
historyResult = pipelineNested.Invoke();
|
||||
}
|
||||
historyResult = pipeline.Invoke();
|
||||
}
|
||||
else
|
||||
{
|
||||
using (Pipeline pipeline = this.powershell.Runspace.CreatePipeline("Get-History"))
|
||||
{
|
||||
historyResult = pipeline.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user