Skip to content

Commit 7f0cfac

Browse files
committed
update profile.ps1's debug output
1 parent dc3b142 commit 7f0cfac

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ jobs:
4848
cmd /c vendor\init.bat /v /d /t
4949
- name: Testing PowerShell
5050
run: |
51-
PowerShell.exe -ExecutionPolicy Bypass -NoLogo -NoProfile -Command "$CMDER_DEBUG = 1; 'vendor\profile.ps1' 4>&1 5>&1"
52-
PowerShell.exe -ExecutionPolicy Bypass -NoLogo -NoProfile -Command "$env:CMDER_DEBUG='1'; . 'vendor\profile.ps1'" 4>&1 5>&1
51+
PowerShell.exe -ExecutionPolicy Bypass -NoLogo -NoProfile -Command "$env:CMDER_DEBUG='1'; . 'vendor\profile.ps1'"
5352
- name: Testing Bash
5453
run: |
5554
bash vendor/cmder.sh

vendor/profile.ps1

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ if (-not $moduleInstallerAvailable -and -not $env:PSModulePath.Contains($CmderMo
4545
$env:PSModulePath = $env:PSModulePath.Insert(0, "$CmderModulePath;")
4646
}
4747

48-
if ($ENV:CMDER_USER_CONFIG) {
48+
if ($env:CMDER_USER_CONFIG) {
4949
Write-Verbose "CMDER IS ALSO USING INDIVIDUAL USER CONFIG FROM '$ENV:CMDER_USER_CONFIG'!"
5050
}
5151

@@ -71,11 +71,14 @@ foreach ($git in (Get-Command -ErrorAction SilentlyContinue 'git')) {
7171

7272
# Use user installed Git
7373
if ($null -eq $gitPathUser) {
74+
Write-Debug "Detected Git from mingw bin directory"
75+
Write-Debug "Git Dir: ${gitDir}"
7476
if ($gitDir -match '\\mingw32\\bin' -or $gitDir -match '\\mingw64\\bin') {
75-
$gitPathUser = ($gitDir.subString(0,$gitDir.Length - 12))
77+
$gitPathUser = $gitDir.subString(0, $gitDir.Length - 12)
7678
} else {
77-
$gitPathUser = ($gitDir.subString(0,$gitDir.Length - 4))
79+
$gitPathUser = $gitDir.subString(0, $gitDir.Length - 4)
7880
}
81+
Write-Debug "Git Path User: ${gitDir}"
7982
}
8083

8184
if ($useGitVersion -eq $gitVersionUser) {

0 commit comments

Comments
 (0)