devblackops/Stucco

No classes support

avezinaATastus opened this issue · 0 comments

Description
Classes are not imported.

Steps to Reproduce
New Module from stucco with classes.

Current Behavior
Classes are not imported

Expected behavior
Classes are imported

Possible Solution

use this (in module.psm1) when we say yes to classes :

$classes = @(Get-ChildItem -Path (Join-Path -Path $PSScriptRoot -ChildPath 'Classes/*.ps1') -Recurse -ErrorAction Stop)

foreach ($import in @($classes + $public + $private )) {
    try {
        . $import.FullName
    } catch {
        throw "Unable to dot source [$($import.FullName)]"
    }
}

Environment

  • Module version used: latest
  • Operating System and PowerShell version:
    Win10-2004
    PS5.1