1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00

Make the dependency code use POSIX awk syntax (closes #8689)

git-svn-id: http://svn.rubyonrails.org/rails/tools/capistrano@7129 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Jamis Buck 2007-06-27 02:21:34 +00:00
parent d0b8e8b25d
commit 297e3d0e76
2 changed files with 4 additions and 2 deletions

View file

@ -1,5 +1,7 @@
*SVN*
* Make the awk use in the dependencies code work with POSIX awk [mcornick]
* Make variable accesses thread safe [via Adrian Danieli]
* Make user input for yes/no prompts work correctly in the Mercurial module [Matthew Elder]

View file

@ -30,7 +30,7 @@ module Capistrano
def gem(name, version, options={})
@message ||= "gem `#{name}' #{version} could not be found"
gem_cmd = configuration.fetch(:gem_command, "gem")
try("#{gem_cmd} specification --version '#{version}' #{name} 2>&1 | awk 'BEGIN { s = 0 }; /^name:/ { s = 1; exit }; END { if(s == 0) exit 1 }'", options)
try("#{gem_cmd} specification --version '#{version}' #{name} 2>&1 | awk 'BEGIN { s = 0 } /^name:/ { s = 1; exit }; END { if(s == 0) exit 1 }'", options)
self
end
@ -62,4 +62,4 @@ module Capistrano
end
end
end
end
end