Repository navigation
Remove redundant check from Start-EditorServices - #2344
Open
Christian Pfeiffer (ChrisTX) wants to merge 1 commit into
Open
Christian Pfeiffer (ChrisTX) wants to merge 1 commit into
Christian Pfeiffer (ChrisTX) wants to merge 1 commit into
Conversation
6f76c6e introduced a correct change to the ValidateSet, but added a redundant check that is already handled in `StartEditorServicesCommand.cs` in its `StartLogging()` routine. In fact, exchanging the values in Start-EditorServices will suppress the warning about the old PSES log levels that `StartLogging()` would normally emit. However, the check is actually harmful on top of this issue since it doesn't check if LogLevel is even set. If LogLevel is `$null`, then the default option ``` default { $LogLevel } ``` isn't valid PowerShell anymore: ``` The variable cannot be validated because the value $null is not a valid value for the LogLevel variable. ```
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the removal of redundant log-level translation from the PowerShell startup wrapper.
No open issues 🎉
What changed in this PR
Removes redundant log-level translation from the PowerShell startup wrapper, leaving legacy-level handling to StartEditorServicesCommand.StartLogging().
Changes:
- Removes the reassignment that causes validation errors when
LogLevelis omitted. - Leaves legacy log levels unchanged for downstream handling and warnings.
- Normalizes indentation for
SessionDetailsPath.
| File | Description |
|---|---|
module/PowerShellEditorServices/Start-EditorServices.ps1 |
Removes duplicate log-level conversion and adjusts parameter indentation. |
Review effort: Balanced
Christian Pfeiffer (ChrisTX)
added a commit
to ChrisTX/aur-packages
that referenced
this pull request
Nov 5, 2026
- PowerShell/PowerShellEditorServices#2344 replaces #2333, which was closed by accident Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Arch Linux Technical User (archlinux-github)
pushed a commit
to archlinux/aur
that referenced
this pull request
Nov 5, 2026
- PowerShell/PowerShellEditorServices#2344 replaces #2333, which was closed by accident Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This replaces #2333, which I closed by accident when cleaning up my forks. It's the same change, rebased onto the current main.
6f76c6e introduced a correct change to the ValidateSet, but added a redundant check that is already handled in
StartEditorServicesCommand.csin itsStartLogging()routine. In fact, exchanging the values in Start-EditorServices will suppress the warning about the old PSES log levels thatStartLogging()would normally emit.However, the check is actually harmful on top of this issue since it doesn't check if LogLevel is even set.
If LogLevel is
$null, then the default optionisn't valid PowerShell anymore: