@@ -396,6 +396,11 @@ try {
396
396
throw new Error ( "Traffic is required" ) ;
397
397
}
398
398
399
+ // Check if deployment YAML file exists
400
+ if ( ! deploymentYamlFilePath ) {
401
+ throw new Error ( "Deployment YAML file path is required." ) ;
402
+ }
403
+
399
404
// Check if the resource group exists
400
405
console . log ( `🔹 Checking if resource group '${ resourceGroup } ' exists...` )
401
406
;
@@ -431,7 +436,7 @@ try {
431
436
}
432
437
433
438
// Check if registry name is provided
434
- if ( registryName !== undefined ) {
439
+ if ( registryName !== undefined && registryName !== "" ) {
435
440
436
441
// Check if the registry exists
437
442
console . log ( `🔹 Checking if registry '${ registryName } ' exists in resource group '${ registryResourceGroup } '...` ) ;
@@ -445,7 +450,7 @@ try {
445
450
}
446
451
447
452
// Check if model exists in registry
448
- if ( registryName !== undefined ) {
453
+ if ( registryName !== undefined && registryName !== "" ) {
449
454
console . log ( `🔹 Checking if model '${ modelName } ' exists in registry '${ registryName } '...` ) ;
450
455
451
456
const modelInRegistryExists = await checkIfModelInRegistryExists (
@@ -469,10 +474,6 @@ try {
469
474
}
470
475
}
471
476
472
- // Check if deployment YAML file exists
473
- if ( ! deploymentYamlFilePath ) {
474
- throw new Error ( "Deployment YAML file path is required." ) ;
475
- }
476
477
console . log ( `🔹 Checking if deployment YAML file '${ deploymentYamlFilePath } ' exists...` ) ;
477
478
478
479
// Check if the deployment YAML file exists
0 commit comments