File tree 1 file changed +8
-6
lines changed 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -137,10 +137,6 @@ func legacyCreate(args []string) error {
137
137
}
138
138
139
139
func create (args []string ) error {
140
- if activeGroup != nil {
141
- return fmt .Errorf ("command does not yet support groups" )
142
- }
143
-
144
140
fs := flag .NewFlagSet ("create" , flag .ContinueOnError )
145
141
146
142
fs .Usage = func () {
@@ -177,12 +173,12 @@ func create(args []string) error {
177
173
return fmt .Errorf ("failed to create buildlet: %v" , statusFromError (err ))
178
174
}
179
175
var instanceName string
176
+ updateLoop:
180
177
for {
181
178
update , err := stream .Recv ()
182
179
switch {
183
180
case err == io .EOF :
184
- fmt .Println (instanceName )
185
- return nil
181
+ break updateLoop
186
182
case err != nil :
187
183
return fmt .Errorf ("failed to create buildlet: %v" , statusFromError (err ))
188
184
case update .GetStatus () != protos .CreateInstanceResponse_COMPLETE && status :
@@ -191,4 +187,10 @@ func create(args []string) error {
191
187
instanceName = update .GetInstance ().GetGomoteId ()
192
188
}
193
189
}
190
+ fmt .Println (instanceName )
191
+ if activeGroup == nil {
192
+ return nil
193
+ }
194
+ activeGroup .Instances = append (activeGroup .Instances , instanceName )
195
+ return storeGroup (activeGroup )
194
196
}
You can’t perform that action at this time.
0 commit comments