Skip to content

Commit

Permalink
Use full path to get .gitmodules
Browse files Browse the repository at this point in the history
  • Loading branch information
thedarkone committed Apr 15, 2009
1 parent ead1c57 commit c26bf17
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/capistrano/recipes/deploy/strategy/utilities/copy.rb
Expand Up @@ -23,12 +23,13 @@
from = ARGV.shift or abort "need source directory"
to = ARGV.shift or abort "need target directory"

exclude = ARGV
gitmodules = File.readlines('.gitmodules').map {|line| line =~ /\[submodule "([^"]+)"\]/ && $1 }.compact rescue []
exclude = ARGV

from = File.expand_path(from)
to = File.expand_path(to)

gitmodules = File.readlines(File.join(from, '.gitmodules')).map {|line| line =~ /\[submodule "([^"]+)"\]/ && $1 }.compact rescue []

Dir.chdir(from) do
FileUtils.mkdir_p(to)
queue = Dir.glob("*", File::FNM_DOTMATCH)
Expand Down

0 comments on commit c26bf17

Please sign in to comment.