Skip to content

Commit 5530ccb

Browse files
azure-sdkbenbp
andauthored
Throw error if deprecated parameter -UserAuth is passed (#42396)
Co-authored-by: Ben Broderick Phillips <[email protected]>
1 parent 5fb6e53 commit 5530ccb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

eng/common/TestResources/New-TestResources.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,11 @@ param (
129129

130130
$wellKnownTMETenants = @('70a036f6-8e4d-4615-bad6-149c02e7720d')
131131

132+
# People keep passing this legacy parameter. Throw an error to save them future keystrokes
133+
if ($NewTestResourcesRemainingArguments -like '*UserAuth*') {
134+
throw "The -UserAuth parameter is deprecated and is now the default behavior"
135+
}
136+
132137
if (!$ServicePrincipalAuth) {
133138
# Clear secrets if not using Service Principal auth. This prevents secrets
134139
# from being passed to pre- and post-scripts.

0 commit comments

Comments
 (0)