Skip to content

Commit

Permalink
Updated the Get-ChildItem to a more streamlined
Browse files Browse the repository at this point in the history
format.
  • Loading branch information
rasimmers committed Oct 19, 2023
1 parent 3fd9686 commit 7901027
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions FreshservicePS/FreshservicePS.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@ else {
$Global:FreshServiceConfigPath = ('{0}/{1}/{1}.config' -f $env:HOME,$FreshServiceModuleName)
}

# Dot source public/private functions
# $public = @(Get-ChildItem -Path (Join-Path -Path $PSScriptRoot -ChildPath 'Public/*.ps1') -Recurse -ErrorAction Stop)
# $private = @(Get-ChildItem -Path (Join-Path -Path $PSScriptRoot -ChildPath 'Private/*.ps1') -Recurse -ErrorAction Stop)

$FunctionFiles = $("$PSScriptRoot\Public\","$PSScriptRoot\Private\")| Get-Childitem -File -Recurse -Include "*.ps1" -ErrorAction SilentlyContinue
$FunctionFiles = $("$PSScriptRoot\Public\","$PSScriptRoot\Private\") |
Get-Childitem -File -Recurse -Include "*.ps1" -ErrorAction SilentlyContinue

foreach ($import in $FunctionFiles) {
try {
Expand Down

0 comments on commit 7901027

Please sign in to comment.