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