@@ -27790,6 +27790,11 @@ try {
2779027790 throw new Error("Traffic is required");
2779127791 }
2779227792
27793+ // Check if deployment YAML file exists
27794+ if (!deploymentYamlFilePath) {
27795+ throw new Error("Deployment YAML file path is required.");
27796+ }
27797+
2779327798 // Check if the resource group exists
2779427799 console.log(`🔹 Checking if resource group '${resourceGroup}' exists...`)
2779527800 ;
@@ -27825,7 +27830,7 @@ try {
2782527830 }
2782627831
2782727832 // Check if registry name is provided
27828- if (registryName !== undefined) {
27833+ if (registryName !== undefined && registryName !== "" ) {
2782927834
2783027835 // Check if the registry exists
2783127836 console.log(`🔹 Checking if registry '${registryName}' exists in resource group '${registryResourceGroup}'...`);
@@ -27839,7 +27844,7 @@ try {
2783927844 }
2784027845
2784127846 // Check if model exists in registry
27842- if(registryName !== undefined) {
27847+ if(registryName !== undefined && registryName !== "" ) {
2784327848 console.log(`🔹 Checking if model '${modelName}' exists in registry '${registryName}'...`);
2784427849
2784527850 const modelInRegistryExists = await checkIfModelInRegistryExists(
@@ -27863,10 +27868,6 @@ try {
2786327868 }
2786427869 }
2786527870
27866- // Check if deployment YAML file exists
27867- if (!deploymentYamlFilePath) {
27868- throw new Error("Deployment YAML file path is required.");
27869- }
2787027871 console.log(`🔹 Checking if deployment YAML file '${deploymentYamlFilePath}' exists...`);
2787127872
2787227873 // Check if the deployment YAML file exists
0 commit comments