From 922993d1fbe1a56ac128370b6ea6ec5691a17e43 Mon Sep 17 00:00:00 2001 From: Jamis Buck Date: Sat, 16 Jun 2007 21:17:20 +0000 Subject: [PATCH] Use `whence' (which works on both bash and vanilla sh) instead of `test -p' (which is bash-specific) git-svn-id: http://svn.rubyonrails.org/rails/tools/capistrano@7040 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- CHANGELOG | 2 ++ lib/capistrano/recipes/deploy/remote_dependency.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 2978141c..1914362d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Use `whence' to test whether a command exists in the remote path, instead of `test -p' [Jamis Buck] + * Make sure the connection factory is established synchronously, to avoid multiple gateway instances being spawned [Jamis Buck] * Make sure symlink and finalize_update tasks reference the most recent release when called by themselves [Jamis Buck] diff --git a/lib/capistrano/recipes/deploy/remote_dependency.rb b/lib/capistrano/recipes/deploy/remote_dependency.rb index 6cb0b50a..1a66936a 100644 --- a/lib/capistrano/recipes/deploy/remote_dependency.rb +++ b/lib/capistrano/recipes/deploy/remote_dependency.rb @@ -23,7 +23,7 @@ module Capistrano def command(command, options={}) @message ||= "`#{command}' could not be found in the path" - try("type -p #{command}", options) + try("which #{command}", options) self end