Rails templates git command runs inside another directory [#2466 status:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
This commit is contained in:
David Calavera 2009-08-30 16:25:07 +02:00 committed by José Valim
parent 0f9675a872
commit 0fc5c59b37

@ -89,13 +89,11 @@ def environment(data=nil, options={}, &block)
# git :add => "onefile.rb", :rm => "badfile.cxx"
#
def git(command={})
in_root do
if command.is_a?(Symbol)
run "git #{command}"
else
command.each do |command, options|
run "git #{command} #{options}"
end
if command.is_a?(Symbol)
run "git #{command}"
else
command.each do |command, options|
run "git #{command} #{options}"
end
end
end