Skip to content

Commit e7fe718

Browse files
committed
v1.21.5 — fix agent installer debug output string interpolation
Debug output showed System.Collections.Hashtable.ToolName instead of actual values due to missing $() subexpression in string expansion. Also includes ps2exe ModuleRoot fix from v1.21.4.
1 parent ecc2d03 commit e7fe718

6 files changed

Lines changed: 18 additions & 6 deletions

File tree

Changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## v1.21.5
4+
5+
- **Bug Fix:** Agent installer diagnostic output now correctly shows ToolName, BaseURL, and FileServer status instead of `System.Collections.Hashtable.ToolName` (PowerShell string interpolation fix in 57-AgentInstaller).
6+
- **Bug Fix:** ps2exe ModuleRoot — compiled EXE now always uses the EXE's own directory for finding defaults files, not the temp extraction directory that `$PSScriptRoot` may point to (00-Initialization).
7+
- 64 modules, 2291 tests
8+
39
## v1.21.3
410

511
- **Bug Fix:** Agent installer failsafe — if company defaults weren't loaded during startup, automatically retry loading when agent installer is accessed. Shows diagnostic info if still misconfigured.

Header.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
7h3 4b1d3r
3131
3232
.VERSION
33-
1.21.3
33+
1.21.5
3434
3535
.LAST UPDATED
3636
03/09/2026

Modules/00-Initialization.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,15 @@ if (-not $script:ScriptPath) {
131131
try { $script:ScriptPath = [System.Diagnostics.Process]::GetCurrentProcess().MainModule.FileName } catch {}
132132
}
133133
if (-not $script:ModuleRoot) { $script:ModuleRoot = $PSScriptRoot }
134+
# ps2exe: $PSScriptRoot may point to a temp extraction dir, not the EXE folder.
135+
# Always prefer the EXE directory when running compiled (detected by empty $PSCommandPath).
136+
if (-not $PSCommandPath -and $script:ScriptPath) {
137+
$script:ModuleRoot = [System.IO.Path]::GetDirectoryName($script:ScriptPath)
138+
}
134139
if (-not $script:ModuleRoot -and $script:ScriptPath) {
135140
$script:ModuleRoot = [System.IO.Path]::GetDirectoryName($script:ScriptPath)
136141
}
137-
$script:ScriptVersion = "1.21.3"
142+
$script:ScriptVersion = "1.21.5"
138143
$script:ScriptStartTime = Get-Date
139144

140145
# OS version detection (for feature compatibility)

Modules/57-AgentInstaller.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -621,8 +621,9 @@ function Install-Agent {
621621
# Diagnostic info to help troubleshoot
622622
Write-OutputColor " Debug: ModuleRoot = $script:ModuleRoot" -color "Debug"
623623
Write-OutputColor " Debug: CompanyDefaults = $script:CompanyDefaultsPath" -color "Debug"
624-
Write-OutputColor " Debug: ToolName = $script:AgentInstaller.ToolName" -color "Debug"
625-
Write-OutputColor " Debug: BaseURL = $script:FileServer.BaseURL" -color "Debug"
624+
Write-OutputColor " Debug: ToolName = $($script:AgentInstaller.ToolName)" -color "Debug"
625+
Write-OutputColor " Debug: BaseURL = $($script:FileServer.BaseURL)" -color "Debug"
626+
Write-OutputColor " Debug: FileServer configured = $(Test-FileServerConfigured)" -color "Debug"
626627
Write-OutputColor "" -color "Info"
627628
Write-PressEnter
628629
return

RackStack.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
Environment-specific settings are configured via defaults.json.
1414
1515
.VERSION
16-
1.21.3
16+
1.21.5
1717
1818
.NOTES
1919
- Requires Windows Server 2012 R2 or later (or Windows 10/11 for testing)

Tests/Run-Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<#
22
.SYNOPSIS
3-
Automated Test Runner for RackStack v1.21.3
3+
Automated Test Runner for RackStack v1.21.5
44
55
.DESCRIPTION
66
Comprehensive non-interactive test suite covering:

0 commit comments

Comments
 (0)