Sha256: 4a525b7fcbab59dc2a013e0d0c65641819cee5a399bcb854b0c174def4e046aa

Contents?: true

Size: 506 Bytes

Versions: 23

Compression:

Stored size: 506 Bytes

Contents

#!/usr/bin/env ruby

begin
  require 'aptible/cli'
rescue
  require 'rubygems'
  require 'aptible/cli'
end

begin
  Aptible::CLI::Agent.start
rescue HyperResource::ClientError => e
  m = if %w(invalid_token expired_token).include? e.body['error']
        'API authentication error: please run aptible login'
      else
        "An error occurred: #{e.body['message']}"
      end
  Aptible::CLI.logger.error(m)
  exit 1
rescue Aptible::CLI::UserError => e
  Aptible::CLI.logger.error e.message
  exit 1
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
aptible-cli-0.24.2 bin/aptible
aptible-cli-0.24.1 bin/aptible
aptible-cli-0.24.0 bin/aptible
aptible-cli-0.23.0 bin/aptible
aptible-cli-0.22.0 bin/aptible
aptible-cli-0.21.0 bin/aptible
aptible-cli-0.20.0 bin/aptible
aptible-cli-0.19.9 bin/aptible
aptible-cli-0.19.7 bin/aptible
aptible-cli-0.19.6 bin/aptible
aptible-cli-0.19.4 bin/aptible
aptible-cli-0.19.3 bin/aptible
aptible-cli-0.19.2 bin/aptible
aptible-cli-0.19.1 bin/aptible
aptible-cli-0.19.0 bin/aptible
aptible-cli-0.18.3 bin/aptible
aptible-cli-0.18.2 bin/aptible
aptible-cli-0.18.1 bin/aptible
aptible-cli-0.18.0 bin/aptible
aptible-cli-0.17.2 bin/aptible