File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/CLU/Microsoft.Azure.Commands.Resources/Models.ResourceGroups Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -329,7 +329,9 @@ private Deployment CreateBasicDeployment(ValidatePSResourceGroupDeploymentParame
329
329
}
330
330
else
331
331
{
332
- deployment . Properties . Template = JObject . Parse ( DataStore . ReadFileAsText ( parameters . TemplateFile ) ) ;
332
+ var textData = DataStore . ReadFileAsText ( parameters . TemplateFile ) ;
333
+ deployment . Properties . Template = string . IsNullOrEmpty ( textData ) ?
334
+ ( object ) textData : JObject . Parse ( DataStore . ReadFileAsText ( parameters . TemplateFile ) ) ;
333
335
}
334
336
335
337
if ( Uri . IsWellFormedUriString ( parameters . ParameterUri , UriKind . Absolute ) )
@@ -341,7 +343,9 @@ private Deployment CreateBasicDeployment(ValidatePSResourceGroupDeploymentParame
341
343
}
342
344
else
343
345
{
344
- deployment . Properties . Parameters = JObject . Parse ( GetDeploymentParameters ( parameters . TemplateParameterObject ) ) ;
346
+ var deploymentParameters = GetDeploymentParameters ( parameters . TemplateParameterObject ) ;
347
+ deployment . Properties . Parameters = string . IsNullOrEmpty ( deploymentParameters ) ?
348
+ ( object ) deploymentParameters : JObject . Parse ( deploymentParameters ) ;
345
349
}
346
350
347
351
return deployment ;
You can’t perform that action at this time.
0 commit comments