@@ -119,30 +119,30 @@ func run(cmdCtx util.CmdContext, o *opts) error {
119119 return util .FlagErrorWrap (err )
120120 }
121121
122- // validate mutual exclusivity
123- if o .providerDataJSONChanged && o .clearProviderDataChanged {
124- return util .FlagErrorf ("--provider-data-json and --clear-provider-data are mutually exclusive" )
125- }
126-
127- // Determine whether any model fields will be changed
128- willUpdateGroup := o .nameChanged || o .descriptionChanged || o .vgTypeChanged || o .providerDataJSONChanged || o .clearProviderDataChanged || o .projectReferencesChanged || o .clearProjectReferencesChanged
129- if ! willUpdateGroup && ! o .authorizeChanged {
130- return util .FlagErrorf ("at least one mutating flag must be supplied" )
131- }
132-
133- taskClient , err := cmdCtx .ClientFactory ().TaskAgent (cmdCtx .Context (), scope .Organization )
134- if err != nil {
135- return fmt .Errorf ("failed to create task agent client: %w" , err )
136- }
137-
138- // resolve variable group
139- group , err := shared .ResolveVariableGroup (cmdCtx , taskClient , scope .Project , scope .Target )
140- if err != nil {
141- return err
142- }
143- if group == nil || group .Id == nil {
144- return fmt .Errorf ("variable group %q not found" , scope .Target )
145- }
122+ // validate mutual exclusivity
123+ if o .providerDataJSONChanged && o .clearProviderDataChanged {
124+ return util .FlagErrorf ("--provider-data-json and --clear-provider-data are mutually exclusive" )
125+ }
126+
127+ // Determine whether any model fields will be changed
128+ willUpdateGroup := o .nameChanged || o .descriptionChanged || o .vgTypeChanged || o .providerDataJSONChanged || o .clearProviderDataChanged || o .projectReferencesChanged || o .clearProjectReferencesChanged
129+ if ! willUpdateGroup && ! o .authorizeChanged {
130+ return util .FlagErrorf ("at least one mutating flag must be supplied" )
131+ }
132+
133+ taskClient , err := cmdCtx .ClientFactory ().TaskAgent (cmdCtx .Context (), scope .Organization )
134+ if err != nil {
135+ return fmt .Errorf ("failed to create task agent client: %w" , err )
136+ }
137+
138+ // resolve variable group
139+ group , err := shared .ResolveVariableGroup (cmdCtx , taskClient , scope .Project , scope .Target )
140+ if err != nil {
141+ return err
142+ }
143+ if group == nil || group .Id == nil {
144+ return fmt .Errorf ("variable group %q not found" , scope .Target )
145+ }
146146
147147 var updatedGroup * taskagent.VariableGroup
148148
0 commit comments