Skip to content

Commit 3587cbc

Browse files
Refactor module import process in main.ps1 for improved logging and clarity
1 parent 3545e31 commit 3587cbc

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

scripts/main.ps1

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,12 @@ switch ($settings) {
2121
$manifestFilePath = Join-Path -Path $modulePath "$moduleName.psd1"
2222
Write-Verbose " - Manifest file path: [$manifestFilePath]" -Verbose
2323
Resolve-PSModuleDependency -ManifestFilePath $manifestFilePath
24-
Test-ModuleManifest -Path $manifestFilePath -Verbose
2524
$PSModulePath = $env:PSModulePath -split [System.IO.Path]::PathSeparator | Select-Object -First 1
2625
$codePath = New-Item -Path "$PSModulePath/$moduleName/999.0.0" -ItemType Directory -Force | Select-Object -ExpandProperty FullName
2726
Copy-Item -Path "$modulePath/*" -Destination $codePath -Recurse -Force
28-
Get-ChildItem -Path $codePath -Recurse | Select-Object FullName | Out-String
29-
30-
Get-Module -ListAvailable | Format-Table -AutoSize | Out-String
31-
32-
Import-Module -Name $moduleName -Verbose
27+
LogGroup 'Importing module' {
28+
Import-Module -Name $moduleName -Verbose
29+
}
3330
}
3431
'SourceCode' {
3532
$codePath = Resolve-Path -Path 'src' | Select-Object -ExpandProperty Path

0 commit comments

Comments
 (0)