1. 29 Apr, 2020 1 commit
  2. 19 Feb, 2019 1 commit
    • Steven Allen's avatar
      cli: get rid of exit channel · 6a12eea7
      Steven Allen authored
      It wasn't a reliable way to determine if the command was "done". We need to wait
      for run, post-run, etc. to finish first.
      
      * Fixes #143
      
      This commit:
      
      1. Removes the exit channel from the CLI response emitter.
      2. Adds a `Status()` function to the `cli.ResponseEmitter` as a replacement
         for (1).
      3. Renames `Exit(code)` to `SetStatus(code)`. This new function doesn't
         immediately _do_ anything other than set the status.
      4. Make sure to wait for _everything_ to finish before returning from `cli.Run`.
      6a12eea7
  3. 26 Oct, 2018 1 commit
    • Steven Allen's avatar
      fix encoding/decoding again · cfa895bf
      Steven Allen authored
      This time, we completely separate error encoding and let the emitter deal with it. Basically:
      
      1. Some transports won't even use the same channel.
      2. We don't *have* an error "encoder" for protobuf.
      
      We now *finally* return the correct content type (json) when returning an error after passing `--enc=protobuf`.
      
      This *also*:
      
      1. Removes GetDecoder. We need to special case this every time anyways.
      2. Allows transports to specify the "default" encoding type instead of assuming JSON.
      3. Ensure that we never mistake a value for an error in the HTTP transport by converting to a cmdkit.Error *before* passing errors to `doPreamble`.
      cfa895bf
  4. 23 Aug, 2018 2 commits