We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d02ed40 commit a5cb843Copy full SHA for a5cb843
Install-RequiredModule.ps1
@@ -1,4 +1,12 @@
1
Push-Location $PSScriptRoot
2
+
3
+# Some people only have a really old version of PowerShellGet that doesn't support pre-release modules
4
+if (!(Get-Command Install-Module -ParameterName 'AllowPrerelease' -ErrorAction 'SilentlyContinue')) {
5
+ $Module = Install-Module 'PowerShellGet' -Repository 'PSGallery' -MaximumVersion 2.99 -MinimumVersion 2.2.5 -Force -Scope CurrentUser -PassThru
6
+ Remove-Module PowerShellGet
7
+ Import-Module PowerShellGet -MinimumVersion $Module.Version -Force
8
+}
9
10
try {
11
$Script = Install-Script Install-RequiredModule -PassThru -Force
12
& (Join-Path $Script.InstalledLocation Install-RequiredModule.ps1)
0 commit comments