Sha256: 08cd76de7d4089ca4b97d795f4e58b9bf6c2b023a4d01ee919712aae5fe99857
Contents?: true
Size: 1.29 KB
Versions: 45
Compression:
Stored size: 1.29 KB
Contents
#!/usr/bin/env ruby # encoding: UTF-8 # resolve bin path, ignoring symlinks require 'pathname' bin_file = Pathname.new(__FILE__).realpath # add self to libpath $:.unshift File.expand_path('../../lib', bin_file) require 'kontena_cli' STDOUT.sync = true begin Kontena::PluginManager.instance.load_plugins Kontena::MainCommand.run rescue Excon::Errors::SocketError => exc if exc.message.include?('Unable to verify certificate') $stderr.puts " [#{Kontena.pastel.red('error')}] The server uses a certificate signed by an unknown authority." $stderr.puts " You can trust this server by copying server CA pem file to: #{Kontena.pastel.yellow("~/.kontena/certs/<hostname>.pem")}" $stderr.puts " Protip: you can bypass the certificate check by setting #{Kontena.pastel.yellow('SSL_IGNORE_ERRORS=true')} env variable, but any data you send to the server could be intercepted by others." abort else abort(exc.message) end rescue Kontena::Errors::StandardError => exc raise exc if ENV['DEBUG'] puts " [#{Kontena.pastel.red('error')}] #{exc.message}" abort rescue => exc raise exc if ENV['DEBUG'] $stderr.puts " [#{Kontena.pastel.red('error')}] #{exc.message}" $stderr.puts " Rerun the command with environment DEBUG=true set to get the full exception" abort end
Version data entries
45 entries across 45 versions & 1 rubygems