Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does Chocolatey hang when using Powershell ISE without the `-y` switch?

When using PowerShell ISE with Chocolatey to install applications, if I forget the -y switch, it hangs waiting on some sort of "confirmation" that's not popping up anywhere?

I have to Ctrl+Alt+Del to kill PowerShell ISE and Chocolatey and it leaves things in half-way state.

This is what it looks like below:

Screenshot

like image 301
Alex Kwitny Avatar asked Oct 20 '25 04:10

Alex Kwitny


1 Answers

In addition to the comments to the OP above, regarding PowerShell ISE not supporting (most) interactive console applications...

It is worth remembering that the REPL window in PowerShell_ISE.exe is not just some sort of docked PowerShell.exe console. Most of the time the user experience is the same, but this hides a number of differences:

  • https://blogs.msdn.microsoft.com/powershell/2009/04/17/differences-between-the-ise-and-powershell-console/

Both these executables are host applications that run a PowerShell runspace (engine). You can even write your own application that "hosts" PowerShell. It is the host application that determines the user experience.

  • PowerShell.org: The Shell vs The host
  • Spiceworks.com: The Shell vs The Host
  • Writing a Windows PowerShell Host

And finally, for the most curious:

  • How PowerShell works

I think I wrote this answer more for my own benefit; it's a useful refresher for me as I get asked this by colleagues every now and again...

like image 196
Charlie Joynt Avatar answered Oct 22 '25 05:10

Charlie Joynt



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!