Permalink
Browse files

Ignoring files that have a .ignore file sitting next to them with exa…

…ct casing...
  • Loading branch information...
1 parent 3a7b0bd commit f78ebffb676a88bf8867294ac9fe2cfc5b5ee216 @ferventcoder ferventcoder committed Feb 6, 2012
Showing with 11 additions and 2 deletions.
  1. +11 −2 src/chocolatey.ps1
View
@@ -279,15 +279,24 @@ Looking for executables in folder: $packageFolder
Adding batch files for any executables found to a location on PATH. In other words the executable will be available from ANY command line/powershell prompt.
$h2
"@ | Write-Host
+ $batchCreated = $false
try {
$files = get-childitem $packageFolder -include *.exe -recurse
foreach ($file in $files) {
- Generate-BinFile $file.Name.Replace(".exe","").Replace(".EXE","") $file.FullName
+ if (!(test-path($file.FullName + '.ignore'))) {
+ Generate-BinFile $file.Name.Replace(".exe","").Replace(".EXE","") $file.FullName
+ $batchCreated = $true
+ }
}
}
catch {
- Write-Host 'There are no executables in the package.'
+ #Write-Host 'There are no executables (that are not ignored) in the package.'
+ }
+
+ if (!($batchCreated)) {
+ Write-Host 'There are no executables (that are not ignored) in the package.'
}
+
Write-Host "$h2"
}
}

0 comments on commit f78ebff

Please sign in to comment.