fix error
This commit is contained in:
Родитель
b30d6df7cb
Коммит
3aa2df101c
|
@ -31,5 +31,5 @@ else
|
|||
if (Get-Module AzureRM.profile)
|
||||
{
|
||||
Write-Warning "Both Az and AzureRM modules were detected on your machine. Az and AzureRM module cannot be run side-by-side, please follow migration guide to ensure Az modules work as expected: <LINK HERE>."
|
||||
throw "Import failed."
|
||||
throw "Both Az and AzureRM modules were detected on your machine. Az and AzureRM module cannot be run side-by-side, please follow migration guide to ensure Az modules work as expected: <LINK HERE>."
|
||||
}
|
|
@ -28,8 +28,8 @@ else
|
|||
}
|
||||
}
|
||||
|
||||
if (Get-Module Az.Profile)
|
||||
if (Get-Module AzureRM.profile)
|
||||
{
|
||||
Write-Warning "Both Az and AzureRM modules were detected on your machine. Az and AzureRM module cannot be run side-by-side, please follow migration guide to ensure Az modules work as expected: <LINK HERE>."
|
||||
throw "Import failed."
|
||||
throw "Both Az and AzureRM modules were detected on your machine. Az and AzureRM module cannot be run side-by-side, please follow migration guide to ensure Az modules work as expected: <LINK HERE>."
|
||||
}
|
|
@ -9,12 +9,19 @@
|
|||
$PSDefaultParameterValues.Clear()
|
||||
Set-StrictMode -Version Latest
|
||||
|
||||
if (Test-Path -Path "$PSScriptRoot\StartupScripts")
|
||||
try
|
||||
{
|
||||
Get-ChildItem "$PSScriptRoot\StartupScripts" | ForEach-Object {
|
||||
. $_.FullName
|
||||
if (Test-Path -Path "$PSScriptRoot\StartupScripts")
|
||||
{
|
||||
Get-ChildItem "$PSScriptRoot\StartupScripts" | ForEach-Object {
|
||||
. $_.FullName
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw "Both Az and AzureRM modules were detected on your machine. Az and AzureRM module cannot be run side-by-side, please follow migration guide to ensure Az modules work as expected: <LINK HERE>."
|
||||
}
|
||||
|
||||
$preloadPath = (Join-Path $PSScriptRoot -ChildPath "PreloadAssemblies")
|
||||
if($PSEdition -eq 'Desktop' -and (Test-Path $preloadPath))
|
||||
|
|
Загрузка…
Ссылка в новой задаче