GinShell.Windows/GinShell.Windows.psm1
|
# Ensure GinShell.Logging is available if (-not (Get-Module -Name GinShell.Logging)) { $loggingPath = Join-Path (Split-Path $PSScriptRoot -Parent) 'GinShell.Logging' if (Test-Path $loggingPath) { Import-Module $loggingPath -Force } else { Import-Module GinShell.Logging -ErrorAction Stop } } $Public = @(Get-ChildItem -Path "$PSScriptRoot\Public\*.ps1" -ErrorAction SilentlyContinue) $Private = @(Get-ChildItem -Path "$PSScriptRoot\Private\*.ps1" -ErrorAction SilentlyContinue) foreach ($file in @($Public + $Private)) { try { . $file.FullName } catch { Write-Error "Failed to import $($file.FullName): $_" } } Export-ModuleMember -Function $Public.BaseName |