| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Rob Holt (@rjmholt) can you make a goal of this to be that someone could copy this code and use it in their own project? The Azure Data Studio folks want this. |
Sorry, something went wrong.
|
TylerLeonhardt It looks like we need to merge PowerShell/PowerShellEditorServices#1066 to get tests to proceed |
Sorry, something went wrong.
|
Yep - that was needed |
Sorry, something went wrong.
| suite("Platform module", () => { | ||
| let tempEnv: NodeJS.ProcessEnv; | ||
|
|
||
| suite("PlatformDetails", () => { |
There was a problem hiding this comment.
Thanks for rewriting these!
Sorry, something went wrong.
Co-Authored-By: Tyler James Leonhardt <tylerl0706@gmail.com>
|
TylerLeonhardt ready for review |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM! (one comment that I'm not blocking on)
Sorry, something went wrong.
|
as soon as CI passes feel free to merge. |
Sorry, something went wrong.
A few low-risk cleanups found while combing through the extension: - Remove the unused `getTimestampString()` from `src/utils.ts`. It's been dead since 2017 (`1b424000`), when "Add timestamps and log levels to all extension-side log messages" moved timestamping into the `Logger` and deleted its three call sites. It also had a latent bug: no zero-padding, so it rendered times like `[9:5:3]`. - Remove the unused `getWindowsSystemPowerShellPath()` from `src/platform.ts`. It's been dead since #2238 (2019), which introduced `PowerShellExeFinder` and deleted the `System32PowerShellPath` / `SysnativePowerShellPath` / `SysWow64PowerShellPath` constants that called it. The same path is now built inline in `findWinPS()`, with proper bitness handling in `getSystem32Path()`. - Replace `console.log` with `this.logger.writeDebug` in `writePidIfInDevMode` (`src/session.ts`), per our `ILogger` convention. While here, `await` the `fs.delete` it sits next to so the "Deleted PID file" message is actually true — previously it was a floating promise and the log ran before the delete resolved. - Point the PSScriptAnalyzer rule docs link at `learn.microsoft.com` instead of `docs.microsoft.com` (`src/features/CodeActions.ts`); the old URL just 301s there anyway. I left the Command Explorer's dead code alone since #5508 already rewrites that file. Compile, lint, and format all pass; the touched code has no test coverage so risk is low. Drafted by Copilot (Claude Opus 4.8). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
| Back | FazBrowse Home | New Git URL |
PR Summary
Fixes #2217.
Gets rid of the default PowerShell and available PowerShell list logic in favour of a lazily generated list of PowerShells.
This resolves the issue where the PowerShell extension wouldn't start if PowerShell Core is not installed.
It also adds discovery of the PowerShell MSIX installation.
Discovery of the PowerShell .NET Core Global Tool has been added but is commented out, since a bug in this release persists that prevents passing command arguments needed to start the extension.
TODO: Add more tests
Tests refactored and added.
PR Checklist
Note: Tick the boxes below that apply to this pull request by putting an x between the square brackets.
Please mark anything not applicable to this PR NA.