From f02bbfc5be9667f047e0e3ebf1bc7a4901f00607 Mon Sep 17 00:00:00 2001 From: David Refoua Date: Sat, 15 Oct 2022 00:20:58 +0330 Subject: [PATCH] use Get-ChildItem with excluded files instead of dir --- scripts/pack.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/pack.ps1 b/scripts/pack.ps1 index df1d8b6..81b6d42 100644 --- a/scripts/pack.ps1 +++ b/scripts/pack.ps1 @@ -61,7 +61,8 @@ $version = Get-VersionStr if ($PSCmdlet.MyInvocation.BoundParameters["Verbose"].IsPresent) { Write-Verbose "Packing Cmder $version in $saveTo..." - dir $cmderRoot + $excluded = (Get-Content -Path "$cmderRoot\packignore") -Split [System.Environment]::NewLine | Where-Object {$_} + Get-ChildItem $cmderRoot -Recurse -Force -Exclude $excluded } foreach ($t in $targets.GetEnumerator()) {