10BC0 Transcription for the host stops, when ANY runspace in the host get closed · Issue #2334 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content
Transcription for the host stops, when ANY runspace in the host get closed #2334
@vors

Description

@vors

Steps to reproduce

Start-Transcript -Path foo.txt -Force
$rs = [system.management.automation.runspaces.runspacefactory]::CreateRunspace()
$rs.open()
$ps = [System.Management.Automation.PowerShell]::Create()
$ps.Runspace = $rs
$ps.Dispose()
"Before Dispose"
$rs.Dispose()
"After Dispose"
Stop-Transcript

Expected behavior

No errors, the whole transcript (including "After Dispose") should be in the foo.txt file

Actual behavior

Stop-Transcript : An error occurred stopping transcription: The host is not currently transcribing.
At line:1 char:1
+ Stop-Transcript
+ ~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Stop-Transcript], PSInvalidOperationException
    + FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.StopTranscriptCommand

"After Dispose" is not in the foo.txt file

Environment data

Windows.

> $PSVersionTable
Name                           Value
----                           -----
PSEdition                      Core
PSVersion              
73EC
        6.0.0-alpha
CLRVersion
GitCommitId                    v6.0.0-alpha.10
WSManStackVersion              3.0
BuildVersion                   3.0.0.0
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Also verfied in inbox

Name                           Value
----                           -----
PSVersion                      5.1.14393.187
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.187
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

cc @adityapatwardhan @LeeHolmes @PaulHigin

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0