Skip to content

Commit

Permalink
Merge pull request chocolatey-archive#103 from helge000/MODULES-7042
Browse files Browse the repository at this point in the history
(MODULES-8521) Fix $chocolatey_version parameter
  • Loading branch information
carabasdaniel authored Sep 25, 2019
2 parents 6cca327 + 7fa2fc4 commit 9727d51
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,19 @@
undef => '$false',
default => "'${install_proxy}'",
}
$download_url = $::chocolatey::chocolatey_download_url
$_download_url = $::chocolatey::chocolatey_download_url
$seven_zip_download_url = $::chocolatey::seven_zip_download_url
$seven_zip_exe = "${facts['choco_temp_dir']}\\7za.exe"

# lint:ignore:only_variable_string
if "${_download_url}" =~ /^http(s)?:\/\/.*api\/v2\/package.*\/$/ and "${::chocolatey::chocolatey_version}" =~ /\d+\./ {
# Assume a nuget server source and we want to download a specific version instead the most current
$download_url = "${_download_url}${::chocolatey::chocolatey_version}"
} else {
$download_url = $_download_url
}
# lint:endignore

if $::chocolatey::use_7zip {
$unzip_type = '7zip'
file { $seven_zip_exe:
Expand Down

0 comments on commit 9727d51

Please sign in to comment.