You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🩹 [Patch]: Update scripts to output as strings (#44)
## Description
This pull request includes changes to improve output formatting and
enable ANSI output rendering, including adding `Out-String` to several
`Format-*` cmdlets and setting `OutputRendering` to 'Ansi'. This is to
avoid table and list output to wrap or cut of text.
### Improvements to output formatting:
* `scripts/info.ps1`:
* Added `Out-String` to the output of `Format-Table` and `Format-List`
cmdlets.
* `scripts/init.ps1`:
* Added `Out-String` to the output of `Format-List` cmdlets.
* Set `$PSStyle.OutputRendering` to 'Ansi' to enable ANSI output
rendering.
* `tests/info.ps1`:
* Added `Out-String` to the output of `Format-List` cmdlets.
### Enabling ANSI output rendering:
* `scripts/outputs.ps1`:
* Modified the script to use `Out-String` for output formatting and
added a loop to log each output property with ANSI color styling.
### Tests
* `.github/workflows/TestWorkflow.yml`:
* Enabled ANSI output rendering and used `Out-String` to format various
outputs in multiple sections, including `Result - Json`, `Result -
Object`, `Context`, `GitConfig`, `WISECAT`, and `Get-GitHubUser`.
## 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
0 commit comments