Skip to content

Commit 2619642

Browse files
VineethReyyav-vreyya
and
v-vreyya
authored
chocolatey changes (#4223)
Co-authored-by: v-vreyya <v-vreyya@DESKTOP-RT7L5HG>
1 parent c09a203 commit 2619642

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

publish-scripts/chocolatey/installps_template

+5-2
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,14 @@ $packageArgs = @{
4040
Install-ChocolateyZipPackage @packageArgs
4141

4242
# only symlink for func.exe
43-
$files = Get-ChildItem $toolsDir -include *.exe -recurse
43+
$files = Get-ChildItem $toolsDir -filter *.exe -Recurse -File
4444
foreach ($file in $files) {
45-
if (!$file.Name.Equals("func.exe")) {
45+
if (!$file.Name.Equals("func.exe") -or (!($file.DirectoryName -eq $toolsDir) -and
46+
$file.Name.Equals("func.exe"))) {
4647
#generate an ignore file
4748
New-Item "$file.ignore" -type file -force | Out-Null
49+
$ignoreFilePath = Join-Path -Path $file.DirectoryName -ChildPath "$($file.Name).ignore"
50+
New-Item -Path $ignoreFilePath -Type File -Force | Out-Null
4851
}
4952
}
5053

0 commit comments

Comments
 (0)