Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/StackHCI/StackHCI.Autorest/custom/stackhci.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Copy link

Copilot AI Oct 8, 2025

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.

Suggested change
if ($computerNameHasDNSSuffix -eq $true)
if ($computerNameHasDNSSuffix)

Copilot uses AI. Check for mistakes.

{
$ComputerNameWithDNSSuffix = $ComputerName
}
Expand Down Expand Up @@ -5608,7 +5610,9 @@ function Get-SetupLoggingDetails

if($isManagementNode)
{
if (Test-ComputerNameHasDnsSuffix -ComputerName $ComputerName)
$computerNameHasDNSSuffix = Test-ComputerNameHasDnsSuffix -ComputerName $ComputerName

Copy link

Copilot AI Oct 8, 2025

Choose a reason for hiding this comment

The 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.

if ($computerNameHasDNSSuffix -eq $true)
Copy link

Copilot AI Oct 8, 2025

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.

Suggested change
if ($computerNameHasDNSSuffix -eq $true)
if ($computerNameHasDNSSuffix)

Copilot uses AI. Check for mistakes.

{
$ComputerNameWithDNSSuffix = $ComputerName
}
Expand Down