File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed
src/ResourceManager/Automation/Commands.Automation/Cmdlet Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -79,12 +79,20 @@ public override void ExecuteCmdlet()
79
79
{
80
80
var nodeName = System . IO . Path . GetFileNameWithoutExtension ( Path ) ;
81
81
var nodeConfigurationName = ConfigurationName + "." + nodeName ;
82
+ NodeConfiguration nodeConfigurationModel = null ;
82
83
83
- // if node configuration already exists, ensureuser knows about it.
84
- var nodeConfigurationModel = AutomationClient . GetNodeConfiguration ( ResourceGroupName ,
85
- AutomationAccountName ,
86
- nodeConfigurationName ,
87
- null ) ;
84
+ try
85
+ {
86
+ // if node configuration already exists, ensureuser knows about it.
87
+ nodeConfigurationModel = AutomationClient . GetNodeConfiguration ( ResourceGroupName ,
88
+ AutomationAccountName ,
89
+ nodeConfigurationName ,
90
+ null ) ;
91
+ }
92
+ catch ( ResourceNotFoundException )
93
+ {
94
+ nodeConfigurationModel = null ;
95
+ }
88
96
89
97
if ( nodeConfigurationModel != null && ! IncrementNodeConfigurationBuild . IsPresent )
90
98
{
You can’t perform that action at this time.
0 commit comments