@@ -298,11 +298,9 @@ var configProfileApplyCmd = &cmds.Command{
298
298
cmds .StringArg ("profile" , true , false , "The profile to apply to the config." ),
299
299
},
300
300
Run : func (req cmds.Request , res cmds.Response ) {
301
- args := req .Arguments ()
302
-
303
- profile , ok := config .Profiles [args [0 ]]
301
+ profile , ok := config .Profiles [req .Arguments ()[0 ]]
304
302
if ! ok {
305
- res .SetError (fmt .Errorf ("%s in not a profile" , args [0 ]), cmds .ErrNormal )
303
+ res .SetError (fmt .Errorf ("%s is not a profile" , req . Arguments () [0 ]), cmds .ErrNormal )
306
304
return
307
305
}
308
306
@@ -326,11 +324,9 @@ Backing up the config before running this command is advised.`,
326
324
cmds .StringArg ("profile" , true , false , "The profile to apply to the config." ),
327
325
},
328
326
Run : func (req cmds.Request , res cmds.Response ) {
329
- args := req .Arguments ()
330
-
331
- profile , ok := config .Profiles [args [0 ]]
327
+ profile , ok := config .Profiles [req .Arguments ()[0 ]]
332
328
if ! ok {
333
- res .SetError (fmt .Errorf ("%s in not a profile" , args [0 ]), cmds .ErrNormal )
329
+ res .SetError (fmt .Errorf ("%s is not a profile" , req . Arguments () [0 ]), cmds .ErrNormal )
334
330
return
335
331
}
336
332
0 commit comments