-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Bug Fix: Buse boolean in comparision #28653
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -461,7 +461,9 @@ Function Write-NodeEventLog{ | |||||
{ | ||||||
Write-VerboseLog ("Connecting from management node") | ||||||
|
||||||
if (Test-ComputerNameHasDnsSuffix -ComputerName $ComputerName) | ||||||
$computerNameHasDNSSuffix = Test-ComputerNameHasDnsSuffix -ComputerName $ComputerName | ||||||
|
||||||
if ($computerNameHasDNSSuffix -eq $true) | ||||||
{ | ||||||
$ComputerNameWithDNSSuffix = $ComputerName | ||||||
} | ||||||
|
@@ -5608,7 +5610,9 @@ function Get-SetupLoggingDetails | |||||
|
||||||
if($isManagementNode) | ||||||
{ | ||||||
if (Test-ComputerNameHasDnsSuffix -ComputerName $ComputerName) | ||||||
$computerNameHasDNSSuffix = Test-ComputerNameHasDnsSuffix -ComputerName $ComputerName | ||||||
|
||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Inconsistent indentation: this line has extra whitespace that doesn't match the surrounding code formatting.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||
if ($computerNameHasDNSSuffix -eq $true) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Explicit comparison with
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||
{ | ||||||
$ComputerNameWithDNSSuffix = $ComputerName | ||||||
} | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explicit comparison with
$true
is unnecessary in PowerShell. The variable$computerNameHasDNSSuffix
can be used directly in the if statement:if ($computerNameHasDNSSuffix)
. This is more idiomatic PowerShell and achieves the same result.Copilot uses AI. Check for mistakes.