Skip to content

🩹 [Patch]: Update scripts to output as strings #44

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Mar 1, 2025
Merged

Conversation

MariusStorhaug
Copy link
Member

@MariusStorhaug MariusStorhaug commented Mar 1, 2025

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

  • 📖 [Docs]
  • 🪲 [Fix]
  • 🩹 [Patch]
  • ⚠️ [Security fix]
  • 🚀 [Feature]
  • 🌟 [Breaking change]

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas

@MariusStorhaug MariusStorhaug self-assigned this Mar 1, 2025
…erate output fence based on content length for improved readability
…improved visual alignment with access information
@MariusStorhaug MariusStorhaug merged commit 7f22b12 into main Mar 1, 2025
10 checks passed
@MariusStorhaug MariusStorhaug deleted the log branch March 1, 2025 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant