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
122
122
$windows_source = ' https://nightlies.puppet.com/downloads'
123
123
} elseif (($collection -like ' *puppetcore*' ) -And -Not ($PSBoundParameters.ContainsKey (' windows_source' ))) {
124
124
$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
+ }
125
128
}
126
129
127
130
if ($absolute_source ) {
Original file line number Diff line number Diff line change @@ -841,11 +841,15 @@ case $platform in
841
841
arch=" arm64"
842
842
fi
843
843
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
844
848
dots=$( echo " ${version} " | grep -o ' \.' | wc -l)
845
849
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"
847
851
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} "
849
853
fi
850
854
else
851
855
download_url=" ${mac_source} /mac/${collection} /${platform_version} /${arch} /${filename} "
You can’t perform that action at this time.
0 commit comments