Github user geomacy commented on a diff in the pull request:

    https://github.com/apache/brooklyn-client/pull/54#discussion_r121903310
  
    --- Diff: cli/commands/set.go ---
    @@ -51,9 +53,28 @@ func (cmd *SetConfig) Run(scope scope.Scope, c 
*cli.Context) {
        if err := net.VerifyLoginURL(cmd.network); err != nil {
                error_handler.ErrorExit(err)
        }
    -   response, err := entity_config.SetConfig(cmd.network, 
scope.Application, scope.Entity, scope.Config, c.Args().First())
    -   if nil != err {
    -           error_handler.ErrorExit(err)
    +   
    +   config := scope.Config
    +   sensor := scope.Sensor
    +   if config != "" && sensor != "" {
    +           error_handler.ErrorExit(errors.New("Both config and sensor 
supplied when calling set. Please only specify one."))
    +   }
    +   
    +   if config == "" && sensor == "" {
    +           error_handler.ErrorExit(errors.New("Please specify either 
config or scope when calling set."))
    +   }
    +   
    +   if config != "" {
    +           _, err := entity_config.SetConfig(cmd.network, 
scope.Application, scope.Entity, config, c.Args().First())
    +           if nil != err {
    +                   error_handler.ErrorExit(err)
    +           }
    +           fmt.Println("Config set correctly")
    --- End diff --
    
    Just leave this line out, and 78 below. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to