Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pester extension causes vscode to always open the PowerShell extension window even on non-PowerShell projects #284

Open
markdall opened this issue Jan 16, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@markdall
Copy link

My apologies (seriously) if this is a dupe, my search-fu is weak this morning - I did try. I'm running the latest released build of Pester.

Repro steps:

  1. On Windows 11, install vscode and Pester along with whatever it depends on.
  2. Open a pester project and make sure you can run tests.
  3. Close vscode.
  4. Open vscode and then open a folder that only contains Python scripts - no PowerShell whatsoever.

Expected results: vscode opens and just sits there.

Actual results: vscode opens along with the PowerShell Extension Window.

Bonus: You can open a folder full of .txt files and see the same behavior.

Workaround: Disable the Pester extension globally and only enable it if you're writing Pester tests in that project.

Thanks.

@JustinGrote
Copy link
Collaborator

JustinGrote commented Jan 17, 2025

Thanks for your submission!

The Pester extension does activate on onStartupFinished if no pester tests exist (because a user can specify custom pester test name paths), and has a lazy initialization process. It shouldn't activate a PowerShell window if it doesn't find any tests, that's the first step, so I can see if there's something going wrong in that startup logic.

No guarantees on timeframe ATM, I do plan on improving this extension but I have other higher priorities at the moment.

@JustinGrote JustinGrote added the bug Something isn't working label Jan 17, 2025
@markdall
Copy link
Author

No worries and thanks so much! I've had it happen across three PCs, though they were all pretty much running the same thing. So if it's me, I'm at least messing something up consistently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants