Skip to content

powershell.exe terminated or terminal UI was closed #1211

Closed
PowerShell/PowerShellEditorServices
#641
@yoke88

Description

@yoke88

System Details

  • Operating system name and version: deepin linux 15.5
  • VS Code version: 1.19.0-1513245498
  • PowerShell extension version: 6.0.1
  • Output from $PSVersionTable:
PS /> code -v                                                                                               
1.20.1
f88bbf9137d24d36d968ea6b2911786bfe103002
x64
PS /> $pseditor.EditorServicesVersion                                                                       
PS /> code --list-extensions --show-versions                                                                
ms-vscode.PowerShell@1.6.0
PS /> $PSVersionTable                                                                                       

Name                           Value                                                                       
----                           -----                                                                       
PSVersion                      6.0.1                                                                       
PSEdition                      Core                                                                        
GitCommitId                    v6.0.1                                                                      
OS                             Linux 4.9.0-deepin13-amd64 #1 SMP PREEMPT Deepin 4.9.57-1 (2017-10-19)      
Platform                       Unix                                                                        
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                     
PSRemotingProtocolVersion      2.3                                                                         
SerializationVersion           1.1.0.1                                                                     
WSManStackVersion              3.0                                                                         

Issue Description

when i open a script , script content is below: there will be a prompt ask for 'The powershell session has terminated due to an error,would you like to restart it ,if i click yes ,after a few minutes ,the prompt appear again.

function get-key{
    [cmdletbinding(ConfirmImpact="medium",
    SupportsShouldProcess=$true
    )]
    [outputtype( )]
    param(
        [Parameter(ParameterSetName="ps1",Mandatory=$true,Position=1,ValueFromPipeline=$true)]
        [ValidateSet("AA","BB")]
        [string]
        $set
    )
    begin{

    }
    process{
        if($PSCmdlet.ShouldProcess("ouput value of `$set =$set","output")){
            Write-Output $set
        }
    }
    end{

    }
}

"AA","BB" |get-key 

Attached Logs

EditorServices.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions