Skip to content

Commit c039d97

Browse files
CopilotDRSDavidSoft
andcommitted
Skip mingw64 check on 32-bit systems for better performance
Co-authored-by: DRSDavidSoft <[email protected]>
1 parent 60045d8 commit c039d97

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

vendor/psmodules/Cmder.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,11 @@ function Set-GitPath {
111111
}
112112

113113
# Add mingw bin directory
114-
foreach ($mingw in @('mingw64', 'mingw32')) {
114+
# Prefer mingw64 on 64-bit systems, mingw32 on 32-bit systems
115+
$is64Bit = [Environment]::Is64BitOperatingSystem
116+
$mingwDirs = if ($is64Bit) { @('mingw64', 'mingw32') } else { @('mingw32') }
117+
118+
foreach ($mingw in $mingwDirs) {
115119
$mingwBin = Join-Path $GitRoot "$mingw\bin"
116120
if ((Test-Path $mingwBin) -and -not ($newPath -match [regex]::Escape($mingwBin))) {
117121
Write-Debug "Adding $mingwBin to the path"

0 commit comments

Comments
 (0)