File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -122,6 +122,9 @@ if (($collection -like '*puppetcore*-nightly*') -And -Not ($PSBoundParameters.Co
122122 $windows_source = ' https://nightlies.puppet.com/downloads'
123123} elseif (($collection -like ' *puppetcore*' ) -And -Not ($PSBoundParameters.ContainsKey (' windows_source' ))) {
124124 $windows_source = ' https://artifacts-puppetcore.puppet.com/v1/download'
125+ if ($version -eq " " -Or ! $version ) {
126+ Throw " You must provide a version to install the agent from puppetcore on Windows/MacOS."
127+ }
125128}
126129
127130if ($absolute_source ) {
Original file line number Diff line number Diff line change @@ -841,11 +841,15 @@ case $platform in
841841 arch=" arm64"
842842 fi
843843 if [[ " $collection " =~ " puppetcore" ]]; then
844+ if [[ -z " $version " ]]; then
845+ critical " You must provide a version to install the agent from puppetcore on MacOS/Windows."
846+ exit 1
847+ fi
844848 dots=$( echo " ${version} " | grep -o ' \.' | wc -l)
845849 if (( dots >= 3 )) ; then
846- download_url=" ${mac_source} ?version=${version} &os_name=osx&os_version=${platform_version} &os_arch=${arch} &dev=true"
850+ download_url=" ${mac_source} ?type=native& version=${version} &os_name=osx&os_version=${platform_version} &os_arch=${arch} &dev=true"
847851 else
848- download_url=" ${mac_source} ?version=${version} &os_name=osx&os_version=${platform_version} &os_arch=${arch} "
852+ download_url=" ${mac_source} ?type=native& version=${version} &os_name=osx&os_version=${platform_version} &os_arch=${arch} "
849853 fi
850854 else
851855 download_url=" ${mac_source} /mac/${collection} /${platform_version} /${arch} /${filename} "
You can’t perform that action at this time.
0 commit comments