Skip to content

Commit a7b5f87

Browse files
committed
possible fix for module import failure
1 parent ef257a0 commit a7b5f87

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/manual-publish-powershell-gallery.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ jobs:
4646
run: |
4747
# Test module manifest
4848
$manifestPath = "./src/PSBlogger.psd1"
49-
$manifestDefinition = "./src/PSBlogger.psm1"
5049
Write-Host "Testing module manifest at: $manifestPath"
5150
5251
# Test manifest syntax
@@ -66,7 +65,9 @@ jobs:
6665
}
6766
6867
# Test that the module can be imported successfully
69-
Import-Module $manifestDefinition -Force
68+
# Use absolute path to the manifest file
69+
$manifestAbsolutePath = Resolve-Path $manifestPath
70+
Import-Module $manifestAbsolutePath -Force
7071
$loadedModule = Get-Module PSBlogger
7172
Write-Host "Successfully imported module. Exported commands:"
7273
$loadedModule.ExportedCommands.Keys | Sort-Object | ForEach-Object { Write-Host " - $_" }

src/PSBlogger.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ PowerShellVersion = '5.1'
4747
RequiredModules = @("Powershell-yaml")
4848

4949
# Assemblies that must be loaded prior to importing this module
50-
RequiredAssemblies = ''
50+
RequiredAssemblies = @()
5151

5252
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
5353
# ScriptsToProcess = @()

0 commit comments

Comments
 (0)