Skip to content
Closed
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
2 changes: 1 addition & 1 deletion Microsoft.PowerShell_profile.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ Use '$($PSStyle.Foreground.Magenta)Show-Help$($PSStyle.Reset)' to display this h
}

if (Test-Path "$PSScriptRoot\CTTcustom.ps1") {
Invoke-Expression -Command "& `"$PSScriptRoot\CTTcustom.ps1`""
. "$PSScriptRoot\CTTcustom.ps1"
Comment on lines 757 to +758
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider building the path with Join-Path (and using Test-Path -LiteralPath) instead of embedding \ in an interpolated string. This avoids wildcard interpretation edge-cases and is more robust if this profile is used under PowerShell Core on non-Windows paths, while matching the existing Join-Path usage elsewhere in this profile (e.g., the Oh My Posh theme path).

Copilot uses AI. Check for mistakes.
}

Write-Host "$($PSStyle.Foreground.Yellow)Use 'Show-Help' to display help$($PSStyle.Reset)"
Loading