summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHomu <homu@barosl.com>2016-10-28 09:03:08 +0900
committerHomu <homu@barosl.com>2016-10-28 09:03:08 +0900
commit72f9a4d68b24ff04f2e01efca978a45ab0159c66 (patch)
tree1d6ec667d34c6eb3992a1c1e1903f4424e12b2e8
parentf0e0cec95a5509afe7753eecd8af90d36012717e (diff)
parent1c96dca35286d38a3a7d0cbedc1a7eb15487890f (diff)
downloadbundler-72f9a4d68b24ff04f2e01efca978a45ab0159c66.tar.gz
Auto merge of #5123 - colby-swandale:fix-otool-ldd-check, r=segiddins
use Bundler.which to check for otool and ldd Hi, there is some weird behaviour in `bundler doctor`. Bundler is checking for the existence of the `ldd` and `otool` commands but is not correctly redirecting the output of `otool`. Example being on the latest version of bundler: ``` › bundle doctor llvm-otool(1): Apple Inc. version cctools-895 llvm-otool(1): Apple Inc. version cctools-895 llvm-otool(1): Apple Inc. version cctools-895 llvm-otool(1): Apple Inc. version cctools-895 llvm-otool(1): Apple Inc. version cctools-895 llvm-otool(1): Apple Inc. version cctools-895 ``` This is happening on Mac OS (10.12). I have refactored the check of these tool using the built in `command` function, this lets us check for the existence of these commands without actually having to execute them. Thanks.
-rw-r--r--lib/bundler/cli/doctor.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundler/cli/doctor.rb b/lib/bundler/cli/doctor.rb
index 728662024b..ae27983240 100644
--- a/lib/bundler/cli/doctor.rb
+++ b/lib/bundler/cli/doctor.rb
@@ -14,11 +14,11 @@ module Bundler
end
def otool_available?
- system("otool --version 2>#{Bundler::NULL} >#{Bundler::NULL}")
+ Bundler.which("otool")
end
def ldd_available?
- !system("ldd --help 2>#{Bundler::NULL} >#{Bundler::NULL}").nil?
+ Bundler.which("ldd")
end
def dylibs_darwin(path)