Skip to content

Commit 982e70c

Browse files
Update action.yml and Import-PSModule.ps1 to enhance output formatting; set shell in action.yml and ensure output is string formatted in Import-PSModule.ps1
1 parent f93eb7c commit 982e70c

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ runs:
3333
using: composite
3434
steps:
3535
- name: Document-PSModule
36+
shell: pwsh
3637
env:
3738
GITHUB_ACTION_INPUT_Name: ${{ inputs.Name }}
38-
shell: pwsh
3939
working-directory: ${{ inputs.WorkingDirectory }}
4040
run: |
4141
# Build-PSModuleDocumentation

scripts/helpers/Import-PSModule.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@
2929
Resolve-PSModuleDependency -ManifestFilePath $manifestFilePath
3030

3131
Write-Host ' - List installed modules'
32-
Get-InstalledPSResource | Format-Table -AutoSize
32+
Get-InstalledPSResource | Format-Table -AutoSize | Out-String
3333

3434
Write-Host " - Importing module [$moduleName] v999"
3535
Import-Module $Path
3636

3737
Write-Host ' - List loaded modules'
3838
$availableModules = Get-Module -ListAvailable -Refresh -Verbose:$false
39-
$availableModules | Select-Object Name, Version, Path | Sort-Object Name | Format-Table -AutoSize
39+
$availableModules | Select-Object Name, Version, Path | Sort-Object Name | Format-Table -AutoSize | Out-String
4040
Write-Host ' - List commands'
4141
$commands = Get-Command -Module $moduleName -ListImported
4242
Write-Host (Get-Command -Module $moduleName -ListImported | Format-Table -AutoSize | Out-String)

scripts/main.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
[CmdletBinding()]
66
param()
77

8+
$PSStyle.OutputRendering = 'Ansi'
9+
810
'platyPS' | ForEach-Object {
911
Install-PSResource -Name $_ -WarningAction SilentlyContinue -TrustRepository -Repository PSGallery
1012
Import-Module -Name $_

0 commit comments

Comments
 (0)