Skip to content

Commit aee74ed

Browse files
🩹 [Patch]: Refactor output handling in main.ps1 for improved readability (#33)
## Description This pull request includes several changes to the `scripts/main.ps1` file to improve the readability and output formatting of the script. The most important changes include: * Removed unnecessary `Write-Output` calls that wrapped the `Get-PSResource` and `Get-Command` outputs. * Added `Out-String` to the `Format-Table` command to ensure the table output is properly formatted as a string. ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [ ] 🪲 [Fix] - [x] 🩹 [Patch] - [ ] ⚠️ [Security fix] - [ ] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas
1 parent 63e7978 commit aee74ed

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/main.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ $requiredModules.GetEnumerator() | Sort-Object | ForEach-Object {
3636
}
3737
}
3838
Write-Output "Installed module: [$name]"
39-
Write-Output (Get-PSResource -Name $name | Select-Object * | Out-String)
39+
Get-PSResource -Name $name | Select-Object * | Out-String
4040

4141
Write-Output 'Module commands:'
42-
Write-Output (Get-Command -Module $name | Out-String)
42+
Get-Command -Module $name | Out-String
4343
}
4444
}
4545

4646
$requiredModules.Keys | Get-InstalledPSResource -Verbose:$false | Sort-Object -Property Name |
47-
Format-Table -Property Name, Version, Prerelease, Repository -AutoSize -Wrap
47+
Format-Table -Property Name, Version, Prerelease, Repository -AutoSize | Out-String

0 commit comments

Comments
 (0)