summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2010-04-03 00:07:03 -0700
committerAndre Arko <andre@arko.net>2010-04-03 00:07:03 -0700
commitf2318021826829210dd0ef5f321c83ca83e7117b (patch)
tree7a4a78b0c272dea1982db98f81ba057f79e3cf95
parentc5850c968d658946311b195b631db93aa0198c26 (diff)
downloadbundler-f2318021826829210dd0ef5f321c83ca83e7117b.tar.gz
Error instead of backtrace when exec'ing non-existent commands.
Closes #241.
-rw-r--r--lib/bundler/cli.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb
index f2b2071da6..b1381b0a32 100644
--- a/lib/bundler/cli.rb
+++ b/lib/bundler/cli.rb
@@ -167,8 +167,12 @@ module Bundler
rubyopt.unshift "-I#{File.expand_path('../..', __FILE__)}"
ENV["RUBYOPT"] = rubyopt.join(' ')
- # Run
- Kernel.exec *ARGV
+ begin
+ # Run
+ Kernel.exec *ARGV
+ rescue Errno::ENOENT
+ Bundler.ui.error "bundler: command not found: #{ARGV.first}"
+ end
end
desc "open GEM", "Opens the source directory of the given bundled gem"