Skip to content

Commit

Permalink
module - correct import closes #132
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmelton committed Mar 30, 2021
1 parent 2a23010 commit 47ec7ce
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Thycotic.SecretServer.psm1
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#region Import Classes
$classesRootDirectories = [IO.Directory]::GetDirectories("$PSScriptRoot\classes")
$classRoot = [IO.Path]::Combine($PSScriptRoot,'classes')
$classesRootDirectories = [IO.Directory]::GetDirectories($classRoot)
foreach ($classRoot in $classesRootDirectories) {
$classDep = [IO.Path]::Combine($classRoot,'dependencies')
# import dependencies first
if (Test-Path "$classRoot\dependencies") {
$dependentClasses = [IO.Directory]::GetFiles("$classRoot\dependencies")
if (Test-Path $classDep) {
$dependentClasses = [IO.Directory]::GetFiles($classDep)
foreach ($class in $dependentClasses) {
. $class
}
Expand Down

0 comments on commit 47ec7ce

Please sign in to comment.