Skip to content

Commit b844a58

Browse files
Microsoft Graph DevX ToolingMicrosoft Graph DevX Tooling
authored andcommitted
Added try catch
1 parent 8199048 commit b844a58

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

azure-pipelines/config/credscan/credscan-suppressions.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@
7171
{
7272
"file": [
7373
"msgraph-sdk-powershell\\src\\Identity.SignIns\\beta\\examples\\Reset-MgBetaUserAuthenticationMethodPassword.md",
74-
"microsoftgraph\\graph-powershell-beta\\Microsoft.Graph.Beta.Identity.SignIns\\Reset-MgBetaUserAuthenticationMethodPassword.md"
74+
"microsoftgraph\\graph-powershell-beta\\Microsoft.Graph.Beta.Identity.SignIns\\Reset-MgBetaUserAuthenticationMethodPassword.md",
75+
"msgraph-sdk-powershell/src\\Identity.SignIns\\v1.0\\examples\\Reset-MgUserAuthenticationMethodPassword.md",
76+
"microsoftgraph\\graph-powershell-beta\\Microsoft.Graph.Beta.Users.Actions\\Reset-MgBetaUserAuthenticationMethodPassword.md"
7577
],
7678
"_justification": "[Identity.SignIns] Examples contain random values recognized as secret"
7779
},

azure-pipelines/update-template.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,14 @@ steps:
55
targetType: 'inline'
66
pwsh: true
77
script: |
8-
Uninstall-Module Microsoft.Graph -Force -AllVersions
9-
Uninstall-Module Microsoft.Graph.Beta -Force -AllVersions
8+
try{
9+
# Try to uninstall the beta module first.
10+
Uninstall-Module Microsoft.Graph.Beta -Force -AllVersions
11+
Uninstall-Module Microsoft.Graph.Beta -Force -AllVersions
12+
}catch{
13+
# If the module is installed, uninstall it.
14+
echo "Error when uninstalling Beta"
15+
}
1016
try{
1117
# Try to update the V1 module first.
1218
Install-Module Microsoft.Graph.Beta -Repository PSGallery -Scope AllUsers -AcceptLicense -SkipPublisherCheck -Force -AllowClobber

0 commit comments

Comments
 (0)