ncerny / chef_stack

4 stars 6 forks source link

V2 runners try to parse non-json response as JSON #5

Closed andy-dufour closed 7 years ago

andy-dufour commented 7 years ago

When we run the delivery api command here:

https://github.com/ncerny/chef_stack/blob/master/resources/wf_builder.rb#L237-L241

It's standard output is not purely JSON, so we get a JSON parse error.

   * ruby_block[install job runner] action run[2017-02-01T13:48:58-06:00] INFO: Processing ruby_block[install job runner] action run (/var/chef/cache/cookbooks/chef_stack/resources/wf_builder.rb line 227)

      ================================================================================
      Error executing action `run` on resource 'ruby_block[install job runner]'
      ================================================================================

      JSON::ParserError
      -----------------
      784: unexpected token at 'Requesting Token
      token: CN20NGom2BAl6331-MNbq_ww1D5RupN6BYScWdyrMFU
      saved API token to: /root/.delivery/api-tokens
      {
        "health": {},
....