summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2016-04-07 09:19:30 -0700
committerSamuel Giddins <segiddins@segiddins.me>2016-06-10 01:42:17 -0500
commit8c1b9e77b08b52018a7b1b38d51dcbcd168938f4 (patch)
tree8005f970b6b18cf6706eb99328d7698cc7b83d57
parent76e6a9d74d2ba925b60712d3a7b33aef23be9fbc (diff)
downloadbundler-8c1b9e77b08b52018a7b1b38d51dcbcd168938f4.tar.gz
[bundle] Automatically trampoline to postit
Except on bundle exec, since that would be too slow
-rw-r--r--bundler.gemspec2
-rwxr-xr-xexe/bundle4
2 files changed, 6 insertions, 0 deletions
diff --git a/bundler.gemspec b/bundler.gemspec
index 0df67402b2..27218d8b4e 100644
--- a/bundler.gemspec
+++ b/bundler.gemspec
@@ -24,6 +24,8 @@ Gem::Specification.new do |s|
s.add_development_dependency "ronn", "~> 0.7.3"
s.add_development_dependency "rspec", "~> 3.0"
+ s.add_runtime_dependency "postit", "~> 0.1.1"
+
s.files = `git ls-files -z`.split("\x0").reject {|f| f.match(%r{^(test|spec|features)/}) }
# we don't check in man pages, but we need to ship them because
# we use them to generate the long-form help for each command.
diff --git a/exe/bundle b/exe/bundle
index 3fb4ccfce9..0047906251 100755
--- a/exe/bundle
+++ b/exe/bundle
@@ -17,6 +17,10 @@ end
require "bundler/friendly_errors"
Bundler.with_friendly_errors do
+ if !"exec".start_with?(ARGV.first || " ") && postit = Gem.bin_path("postit", "postit")
+ Kernel.exec(postit, *ARGV)
+ end
+
require "bundler/cli"
# Allow any command to use --help flag to show help for that command