Skip to content

Commit 7fff37d

Browse files
committed
✨fix: update version number to 1.0.1 and improve verbose output in Save-MaesterOffline function
1 parent be62574 commit 7fff37d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

General/Save-MaesterOffline.ps1

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
.NOTES
1818
Author: Sam Erde (@SamErde)
1919
Company: Sentinel Technologies, Inc
20-
Version: 1.0.0
21-
Date: 2025-09-09
20+
Version: 1.0.1
21+
Date: 2025-09-10
2222
2323
#>
2424
[CmdletBinding()]
@@ -102,9 +102,9 @@
102102
$InstalledModules = @()
103103

104104
if ($PSResourceGetInstalled) {
105-
Write-Host "Using 'Save-PSResource' (Microsoft.PowerShell.PSResourceGet) to download modules.`n" -ForegroundColor White
105+
Write-Verbose "Using 'Save-PSResource' (Microsoft.PowerShell.PSResourceGet) to download modules.`n"
106106
} else {
107-
Write-Host "Using 'Save-Module' (PowerShellGet) to download modules.`n" -ForegroundColor White
107+
Write-Verbose "Using 'Save-Module' (PowerShellGet) to download modules.`n"
108108
}
109109

110110
# Download the required modules into the DestinationPath.
@@ -114,7 +114,7 @@
114114
$Prerelease = $Module.Prerelease
115115

116116
try {
117-
Write-Host "Downloading module: $Name, Version: $Version, Prerelease: $Prerelease" -ForegroundColor Cyan
117+
Write-Host "Downloading module: $($("$Name $Version").Trim()) $(if ($Prerelease) {"(prerelease)"})" -ForegroundColor Cyan
118118
if ($PSResourceGetInstalled) {
119119
#try {
120120
if ($Version) {
@@ -142,7 +142,7 @@
142142
# Summary of downloaded modules.
143143
if ($InstalledModules.Count -gt 0) {
144144
Write-Host "`nDownloaded modules to $DestinationPath`n"
145-
$InstalledModules | ForEach-Object -Process { Write-Host "`t$_" } -End "`n"
145+
$InstalledModules | ForEach-Object -Process { Write-Host "`t$_" } -End { Write-Host "`n" }
146146
} else {
147147
Write-Warning 'No modules were downloaded.'
148148
}
@@ -157,7 +157,7 @@
157157
Write-Verbose "Removed existing ZIP file: $ZipPath"
158158
}
159159
Compress-Archive -Path (Join-Path -Path $DestinationPath -ChildPath '*') -DestinationPath $ZipPath -Force
160-
Write-Host "`nCreated ZIP file: $ZipPath" -ForegroundColor Green
160+
Write-Host "Created ZIP file: $ZipPath" -ForegroundColor Green
161161
} catch {
162162
Write-Error "Failed to create ZIP file: $ZipPath. Error: $_"
163163
}

0 commit comments

Comments
 (0)