Skip to content

Instantly share code, notes, and snippets.

@Samsinite
Created November 7, 2016 23:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Samsinite/a5a4e699537179ef559d30b4d7b54f37 to your computer and use it in GitHub Desktop.
Save Samsinite/a5a4e699537179ef559d30b4d7b54f37 to your computer and use it in GitHub Desktop.
#!/usr/local/heroku/ruby/bin/ruby
# encoding: UTF-8
# resolve bin path, ignoring symlinks
require "pathname"
bin_file = Pathname.new(__FILE__).realpath
# add locally vendored gems to libpath
gem_dir = File.expand_path("../../vendor/gems", bin_file)
Dir["#{gem_dir}/**/lib"].each do |libdir|
$:.unshift libdir
end
# add self to libpath
$:.unshift File.expand_path("../../lib", bin_file)
# inject any code in ~/.heroku/client over top
require "heroku/updater"
Heroku::Updater.inject_libpath
# start up the CLI
require "heroku/cli"
Heroku.user_agent = "heroku-toolbelt/#{Heroku::VERSION} (#{RUBY_PLATFORM}) ruby/#{RUBY_VERSION}"
Heroku::CLI.start(*ARGV)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment