-
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 | ||||||
|
|
||||||
|
||||||
Copilot
AI
Oct 8, 2025
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.
| if ($computerNameHasDNSSuffix -eq $true) | |
| if ($computerNameHasDNSSuffix) |
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
$trueis unnecessary in PowerShell. The variable$computerNameHasDNSSuffixcan be used directly in the if statement:if ($computerNameHasDNSSuffix). This is more idiomatic PowerShell and achieves the same result.