Skip to content

Commit

Permalink
Remove previous Az.Accounts version in Install-AzModule (Azure#13446)
Browse files Browse the repository at this point in the history
  • Loading branch information
msJinLei authored Nov 9, 2020
1 parent ba6ec66 commit 38898b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/Az.Tools.Installer/Az.Tools.Installer.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@
# IconUri = ''

# ReleaseNotes of this module
ReleaseNotes = '* Fix wildcard error in Install-AzModule
* Fix syntax errors in Windows Powershell'
ReleaseNotes = '* Fix bugs for Install-AzModule
* Fix syntax errors when run in Windows Powershell'

# Prerelease string of this module
# Prerelease = ''
Expand Down
3 changes: 3 additions & 0 deletions tools/Az.Tools.Installer/exports/Install-AzModule.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,9 @@ function Install-AzModule {
$parameter.Add('RequiredVersion', $module['Az.Accounts'])
$module.Remove('Az.Accounts')
}
if ($RemovePrevious) {
Uninstall-Module -Name Az.Accounts -AllVersion -ErrorAction SilentlyContinue
}
Install-Module @parameter

$module.Keys | Foreach-Object {
Expand Down

0 comments on commit 38898b9

Please sign in to comment.