Skip to content

Commit a824b72

Browse files
authored
improve CI PowrShell profile test debug/verbose output
1 parent 153f731 commit a824b72

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.github/workflows/tests.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,10 @@ jobs:
4747
run: |
4848
cmd /c vendor\init.bat /v /d /t
4949
- name: Testing PowerShell
50+
env:
51+
CMDER_DEBUG: '1'
5052
run: |
51-
PowerShell.exe -ExecutionPolicy Bypass -NoLogo -NoProfile -Command "$DebugPreference='Continue'; . 'vendor\profile.ps1' 5>&1"
53+
PowerShell.exe -ExecutionPolicy Bypass -NoLogo -NoProfile -Command "'vendor\profile.ps1'"
5254
- name: Testing Bash
5355
run: |
5456
bash vendor/cmder.sh

vendor/profile.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
# !!! THIS FILE IS OVERWRITTEN WHEN CMDER IS UPDATED
66
# !!! Use "%CMDER_ROOT%\config\user_profile.ps1" to add your own startup commands
77

8+
if ($env:CMDER_DEBUG -and ($env:CMDER_DEBUG -match '^(1|true)$')) {
9+
$DebugPreference = 'Continue'
10+
$VerbosePreference = 'Continue'
11+
}
12+
813
$CMDER_INIT_START = Get-Date
914

1015
# Compatibility with PS major versions <= 2

0 commit comments

Comments
 (0)