mirror of
https://github.com/cmderdev/cmder.git
synced 2025-11-09 13:49:05 +08:00
Skip mingw64 check on 32-bit systems for better performance
Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com>
This commit is contained in:
6
vendor/psmodules/Cmder.ps1
vendored
6
vendor/psmodules/Cmder.ps1
vendored
@@ -111,7 +111,11 @@ function Set-GitPath {
|
||||
}
|
||||
|
||||
# Add mingw bin directory
|
||||
foreach ($mingw in @('mingw64', 'mingw32')) {
|
||||
# Prefer mingw64 on 64-bit systems, mingw32 on 32-bit systems
|
||||
$is64Bit = [Environment]::Is64BitOperatingSystem
|
||||
$mingwDirs = if ($is64Bit) { @('mingw64', 'mingw32') } else { @('mingw32') }
|
||||
|
||||
foreach ($mingw in $mingwDirs) {
|
||||
$mingwBin = Join-Path $GitRoot "$mingw\bin"
|
||||
if ((Test-Path $mingwBin) -and -not ($newPath -match [regex]::Escape($mingwBin))) {
|
||||
Write-Debug "Adding $mingwBin to the path"
|
||||
|
||||
Reference in New Issue
Block a user