Skip to content

Commit 876ba12

Browse files
Mark  Orrclaude
andcommitted
Bump version to 2.3.4 with Linux color rendering fix
- Fixed console color rendering on Linux where terminals report invalid (-1) color values - Defensive Write-Host handling for cross-platform terminal compatibility Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent dfe1bc8 commit 876ba12

5 files changed

Lines changed: 34 additions & 10 deletions

File tree

Entra-PIM.ps1

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ $script:CustomClientId = $ClientId
1212
$script:CustomTenantId = $TenantId
1313

1414
# ========================= Version =========================
15-
$script:Version = "2.3.3"
15+
$script:Version = "2.3.4"
1616

1717
# ========================= Cross-Platform Keyboard Shortcuts =========================
1818
# Detect if running on macOS (use built-in $IsMacOS variable if available)
@@ -263,7 +263,7 @@ public class PIMBrowserAuth
263263
</head>
264264
<body>
265265
<div class='container'>
266-
<div class='brand'>[ E N T R A &nbsp; P I M ] <span class='version'>v2.3.3</span></div>
266+
<div class='brand'>[ E N T R A &nbsp; P I M ] <span class='version'>v2.3.4</span></div>
267267
<div class='checkmark'>&#10003;</div>
268268
<h1>Authentication Successful</h1>
269269
<p>You can close this window and return to PowerShell.</p>
@@ -288,7 +288,7 @@ public class PIMBrowserAuth
288288
</head>
289289
<body>
290290
<div class='container'>
291-
<div class='brand'>[ E N T R A &nbsp; P I M ] <span class='version'>v2.3.3</span></div>
291+
<div class='brand'>[ E N T R A &nbsp; P I M ] <span class='version'>v2.3.4</span></div>
292292
<div class='icon'>&#10005;</div>
293293
<h1>Authentication Failed</h1>
294294
<p>Please close this window and try again.</p>
@@ -1864,8 +1864,23 @@ function Show-PIMGlobalHeader {
18641864
[switch]$NoNewline,
18651865
[string]$ControlsText = $null
18661866
)
1867-
1868-
Write-Host $Object -ForegroundColor $ForegroundColor -BackgroundColor $BackgroundColor -NoNewline:$NoNewline
1867+
1868+
# Linux/host combinations can report -1 for console colors; Write-Host rejects that value.
1869+
if ($null -ne $ForegroundColor -and [int]$ForegroundColor -lt 0) { $ForegroundColor = $null }
1870+
if ($null -ne $BackgroundColor -and [int]$BackgroundColor -lt 0) { $BackgroundColor = $null }
1871+
1872+
if ($null -ne $ForegroundColor -and $null -ne $BackgroundColor) {
1873+
Write-Host $Object -ForegroundColor $ForegroundColor -BackgroundColor $BackgroundColor -NoNewline:$NoNewline
1874+
}
1875+
elseif ($null -ne $ForegroundColor) {
1876+
Write-Host $Object -ForegroundColor $ForegroundColor -NoNewline:$NoNewline
1877+
}
1878+
elseif ($null -ne $BackgroundColor) {
1879+
Write-Host $Object -BackgroundColor $BackgroundColor -NoNewline:$NoNewline
1880+
}
1881+
else {
1882+
Write-Host $Object -NoNewline:$NoNewline
1883+
}
18691884

18701885
# Only show control bar when explicitly requested
18711886
if ($ControlsText) {

Entra-PIM.psd1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
RootModule = 'Entra-PIM.psm1'
77

88
# Version number of this module (SemVer format for PSResourceGet)
9-
ModuleVersion = '2.3.3'
9+
ModuleVersion = '2.3.4'
1010

1111
# ID used to uniquely identify this module
1212
GUID = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890'
@@ -58,6 +58,10 @@
5858

5959
# ReleaseNotes of this module
6060
ReleaseNotes = @'
61+
## 2.3.4
62+
- Fixed Linux color rendering issue where console reports invalid (-1) color values
63+
- Defensive Write-Host handling for cross-platform terminal compatibility
64+
6165
## 2.3.3
6266
- Updated module and README descriptions to highlight key features
6367
- Fixed Enter key exiting app when no workflow is selected

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,11 @@ The version check:
177177
[System.Environment]::SetEnvironmentVariable('ENTRAPIM_DISABLE_UPDATE_CHECK', 'true', 'User')
178178
```
179179

180+
## What's New in 2.3.4
181+
182+
- **Linux Color Fix**: Fixed console color rendering on Linux where terminals report invalid (-1) color values
183+
- **Cross-Platform Terminal Compatibility**: Defensive Write-Host handling ensures consistent display across all platforms
184+
180185
## What's New in 2.3.3
181186

182187
- **Enter Key Fix**: Pressing Enter with no workflow selected no longer exits the app

dev-feature/Entra-PIM.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ $script:CustomClientId = $ClientId
1212
$script:CustomTenantId = $TenantId
1313

1414
# ========================= Version =========================
15-
$script:Version = "2.3.3"
15+
$script:Version = "2.3.4"
1616

1717
# ========================= Cross-Platform Keyboard Shortcuts =========================
1818
# Detect if running on macOS (use built-in $IsMacOS variable if available)
@@ -263,7 +263,7 @@ public class PIMBrowserAuth
263263
</head>
264264
<body>
265265
<div class='container'>
266-
<div class='brand'>[ E N T R A &nbsp; P I M ] <span class='version'>v2.3.3</span></div>
266+
<div class='brand'>[ E N T R A &nbsp; P I M ] <span class='version'>v2.3.4</span></div>
267267
<div class='checkmark'>&#10003;</div>
268268
<h1>Authentication Successful</h1>
269269
<p>You can close this window and return to PowerShell.</p>
@@ -288,7 +288,7 @@ public class PIMBrowserAuth
288288
</head>
289289
<body>
290290
<div class='container'>
291-
<div class='brand'>[ E N T R A &nbsp; P I M ] <span class='version'>v2.3.3</span></div>
291+
<div class='brand'>[ E N T R A &nbsp; P I M ] <span class='version'>v2.3.4</span></div>
292292
<div class='icon'>&#10005;</div>
293293
<h1>Authentication Failed</h1>
294294
<p>Please close this window and try again.</p>

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@
428428
GitHub
429429
</a>
430430
</div>
431-
<span class="version-badge">v2.3.3 &middot; PowerShell 7.0+</span>
431+
<span class="version-badge">v2.3.4 &middot; PowerShell 7.0+</span>
432432
</div>
433433

434434
<!-- Features -->

0 commit comments

Comments
 (0)