diff --git a/tasks/install_powershell.ps1 b/tasks/install_powershell.ps1 index 21f54601..7d6134b5 100644 --- a/tasks/install_powershell.ps1 +++ b/tasks/install_powershell.ps1 @@ -122,6 +122,9 @@ if (($collection -like '*puppetcore*-nightly*') -And -Not ($PSBoundParameters.Co $windows_source = 'https://nightlies.puppet.com/downloads' } elseif (($collection -like '*puppetcore*') -And -Not ($PSBoundParameters.ContainsKey('windows_source'))) { $windows_source = 'https://artifacts-puppetcore.puppet.com/v1/download' + if ($version -eq "" -Or !$version) { + Throw "You must provide a version to install the agent from puppetcore on Windows/MacOS." + } } if ($absolute_source) { diff --git a/tasks/install_shell.sh b/tasks/install_shell.sh index 11f02131..e0ec0681 100644 --- a/tasks/install_shell.sh +++ b/tasks/install_shell.sh @@ -841,11 +841,15 @@ case $platform in arch="arm64" fi if [[ "$collection" =~ "puppetcore" ]]; then + if [[ -z "$version" ]]; then + critical "You must provide a version to install the agent from puppetcore on MacOS/Windows." + exit 1 + fi dots=$(echo "${version}" | grep -o '\.' | wc -l) if (( dots >= 3 )); then - download_url="${mac_source}?version=${version}&os_name=osx&os_version=${platform_version}&os_arch=${arch}&dev=true" + download_url="${mac_source}?type=native&version=${version}&os_name=osx&os_version=${platform_version}&os_arch=${arch}&dev=true" else - download_url="${mac_source}?version=${version}&os_name=osx&os_version=${platform_version}&os_arch=${arch}" + download_url="${mac_source}?type=native&version=${version}&os_name=osx&os_version=${platform_version}&os_arch=${arch}" fi else download_url="${mac_source}/mac/${collection}/${platform_version}/${arch}/${filename}"