Skip to content

Commit

Permalink
(GH-1415) Added additional check for zip content file
Browse files Browse the repository at this point in the history
- Check for the existence of the Install.txt file
- If that doesn't exist, fall back to the old filename
- Delete all files in content file as before
  • Loading branch information
gep13 committed Feb 23, 2018
1 parent 3cb969b commit 67d4ad1
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,14 @@ param(
Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters

$packagelibPath=$env:chocolateyPackageFolder
$zipContentFile=(join-path $packagelibPath $zipFileName) + ".txt"
$zipContentFile=(join-path $packagelibPath $zipFileName) + "Install.txt"

# The Zip Content File may have previously existed under a different
# name. If *Install.txt doesn't exist, check for the old name
if(-Not (Test-Path -Path $zipFileContentPath)) {
$zipContentFile=(Join-Path $packagelibPath -ChildPath $zipFileName) + ".txt"
}

if ((Test-Path -path $zipContentFile)) {
$zipContentFile
$zipContents=get-content $zipContentFile
Expand Down

0 comments on commit 67d4ad1

Please sign in to comment.