Fixed uninitialized variable in the help function that was causing it to fail in strict mode#6781
Closed
BrucePay wants to merge 1 commit intoPowerShell:masterfrom
Closed
Fixed uninitialized variable in the help function that was causing it to fail in strict mode#6781BrucePay wants to merge 1 commit intoPowerShell:masterfrom
BrucePay wants to merge 1 commit intoPowerShell:masterfrom
Conversation
Member
SteveL-MSFT
requested changes
Apr 30, 2018
Member
There was a problem hiding this comment.
typo from, probably also remove the trailing punctuation which is inconsistent with general comments
Member
There was a problem hiding this comment.
Perhaps: $help | Should -Not -BeEmptyOrNull instead? If it should fail, the test failure output may make it easier to understand what is going on
7 tasks
5b29ea2 to
bca00c0
Compare
TravisEz13
reviewed
May 1, 2018
| Help | ||
| } | ||
| # the help function renders the help content as text so just verify that there is content | ||
| $help | Should -Not -BeNullOrEmpty $true |
Member
There was a problem hiding this comment.
the $true should not be needed.
describe 'test' {
it 'failing test' {
'' | should -not -BeNullOrEmpty
}
it 'passing test' {
'' | should -BeNullOrEmpty
}
}
Member
|
PR #6059 removes the |
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.
PR #Summary
Fix for #6497. Changed the "help" function in InitialSessionState.cs to initialize the problematic variable so the function won't fail.
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:to the beginning of the title and remove the prefix when the PR is ready.[feature]if the change is significant or affects feature tests