Skip to content

Az.Tools.Predictor + PSReadLine randomly runs something in the terminal #23573

Open
@o-l-a-v

Description

@o-l-a-v

Description

I've had the same issue with Az.Accounts earlier. Thought it was vscode-powershells fault, but seems it was Az.

Here's what happened today: I started writing down a script to Get-AzSentinelDataConnector. Suddenly the terminal outputs the following and won't finish/quit unless I do CTRL+C:

PS C:\Users\olav.birkeland\OneDrive\IT\Code> PipelineStoppedException: The pipeline has been stopped.
   at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
   at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
 Object scriptThis, Pipe outputPipe, InvocationInfo invocationInfo, Object[] args)
   at System.Management.Automation.ScriptBlock.InvokeWithPipe(Boolean useLocalScope, ErrorHandlingBehavior errorHandlingBehavior, Object dollarUnder, Object input, Object scriptThis, Pipe outputPipe, InvocationInfo invocationInfo, Boolean propagateAllExceptionsToTop, List`1 variablesToDefine, Dictionary`2 functionsToDefine, Object[] args)
   at System.Management.Automation.ScriptBlock.DoInvokeReturnAsIs(Boolean useLocalScope, ErrorHandlingBehavior errorHandlingBehavior, Object dollarUnder, Object input, Object scriptThis, Object[] args)
   at System.Management.Automation.CommandInvocationIntrinsics.InvokeScript(ScriptBlock sb, Boolean useNewScope, PipelineResultTypes writeToPipeline, IList input, Object[] args)       
   at System.Management.Automation.CommandInvocationIntrinsics.InvokeScript(String script)
   at Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Runtime.PowerShell.PsHelpers.RunScript[T](CommandInvocationIntrinsics cii, String script)
   at Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Runtime.PowerShell.PsExtensions.RunScript[T](PSCmdlet cmdlet, String script)
   at Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Runtime.PowerShell.PsHelpers.GetScriptCmdlets(PSCmdlet cmdlet, String scriptFolder)
   at Microsoft.Azure.PowerShell.Cmdlets.SecurityInsights.Runtime.PowerShell.GetScriptCmdlet.ProcessRecord()
                                             ^C
PS C:\Users\olav.birkeland\OneDrive\IT\Code>

Issue script & Debug output

I can't reliably reproduce it.

Environment data

  • Windows 11 23H2
  • PowerShell v7.4.0 x64 from MSI installer
  • vscode-powershell v2023.8.0

Module versions

Az.Accounts v2.13.2
Az.SecurityInsights v3.1.1

Error output

No output.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions