File tree Expand file tree Collapse file tree 2 files changed +10
-16
lines changed Expand file tree Collapse file tree 2 files changed +10
-16
lines changed Original file line number Diff line number Diff line change @@ -11,15 +11,9 @@ $ResourceGroup = $env:AZURE_RESOURCE_GROUP
11
11
# Validate required parameters
12
12
$MissingParams = @ ()
13
13
14
- if (-not $SubscriptionId ) {
15
- $MissingParams += " subscription"
16
- }
17
- if (-not $Location ) {
18
- $MissingParams += " location"
19
- }
20
- if (-not $ModelsParameter ) {
21
- $MissingParams += " models-parameter"
22
- }
14
+ if (-not $SubscriptionId ) { $MissingParams += " SubscriptionId" }
15
+ if (-not $Location ) { $MissingParams += " Location" }
16
+ if (-not $ModelsParameter ) { $MissingParams += " ModelsParameter" }
23
17
24
18
if ($MissingParams.Count -gt 0 ) {
25
19
Write-Error " ❌ ERROR: Missing required parameters: $ ( $MissingParams -join ' , ' ) "
Original file line number Diff line number Diff line change @@ -6,15 +6,15 @@ MODELS_PARAMETER=""
6
6
7
7
while [[ $# -gt 0 ]]; do
8
8
case " $1 " in
9
- --subscription )
9
+ --SubscriptionId )
10
10
SUBSCRIPTION_ID=" $2 "
11
11
shift 2
12
12
;;
13
- --location )
13
+ --Location )
14
14
LOCATION=" $2 "
15
15
shift 2
16
16
;;
17
- --models-parameter )
17
+ --ModelsParameter )
18
18
MODELS_PARAMETER=" $2 "
19
19
shift 2
20
20
;;
27
27
28
28
# Validate required parameters
29
29
MISSING_PARAMS=()
30
- [[ -z " $SUBSCRIPTION_ID " ]] && MISSING_PARAMS+=(" subscription " )
31
- [[ -z " $LOCATION " ]] && MISSING_PARAMS+=(" location " )
32
- [[ -z " $MODELS_PARAMETER " ]] && MISSING_PARAMS+=(" models-parameter " )
30
+ [[ -z " $SUBSCRIPTION_ID " ]] && MISSING_PARAMS+=(" SubscriptionId " )
31
+ [[ -z " $LOCATION " ]] && MISSING_PARAMS+=(" Location " )
32
+ [[ -z " $MODELS_PARAMETER " ]] && MISSING_PARAMS+=(" ModelsParameter " )
33
33
34
34
if [[ ${# MISSING_PARAMS[@]} -ne 0 ]]; then
35
35
echo " ❌ ERROR: Missing required parameters: ${MISSING_PARAMS[*]} "
36
- echo " Usage: $0 --subscription <SUBSCRIPTION_ID> --location <LOCATION> --models-parameter <MODELS_PARAMETER>"
36
+ echo " Usage: $0 --SubscriptionId <SUBSCRIPTION_ID> --Location <LOCATION> --ModelsParameter <MODELS_PARAMETER>"
37
37
exit 1
38
38
fi
39
39
You can’t perform that action at this time.
0 commit comments