Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency on 7zip needs to be updated for Chef 15 and and the download url for it needs to be turned into an attribute. #143

Open
rgjoshi24 opened this issue Nov 12, 2019 · 0 comments

Comments

@rgjoshi24
Copy link

In the file install.ps1 there is an external uri dependency to download 7zip, it needs to be made as an attribute, so that we can download it from any internally hosted location.


$7zaExe = Join-Path $tempDir '7za.exe'
$unzipMethod = '7zip'
$useWindowsCompression = $env:chocolateyUseWindowsCompression
if ($useWindowsCompression -ne $null -and $useWindowsCompression -eq 'true') {
Write-Output 'Using built-in compression to unzip'
$unzipMethod = 'builtin'
} elseif (-Not (Test-Path ($7zaExe))) {
Write-Output "Downloading 7-Zip commandline tool prior to extraction."

download 7zip

Download-File 'https://chocolatey.org/7za.exe' "$7zaExe"
}

Also change the logic to use archive_file for Chef 15 and above...


if CHEF::VERSION.to_i >= 15
archive_file 'whatever'
else
include_recipe '7zip::default'

whatever 7zip resource
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant