You've already forked winget-pkgs
mirror of
https://github.com/TermoraDev/winget-pkgs.git
synced 2026-04-22 15:31:19 -07:00
14 lines
555 B
PowerShell
14 lines
555 B
PowerShell
|
|
# Import all sub-modules
|
|
$script:moduleRoot = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|
|
|
Get-ChildItem -Path $script:moduleRoot -Recurse -Depth 1 -Filter '*.psd1'| ForEach-Object {
|
|
if ($_.Name -eq 'YamlCreate.psd1') {
|
|
# Skip the main module manifest as it is already handled
|
|
return
|
|
}
|
|
$moduleFolder = Join-Path -Path $script:moduleRoot -ChildPath $_.Directory.Name
|
|
$moduleFile = Join-Path -Path $moduleFolder -ChildPath $_.Name
|
|
Import-Module $moduleFile -Force -Scope Global -ErrorAction 'Stop'
|
|
}
|