Skip to content
Browse files

Use full path to get .gitmodules

  • Loading branch information...
1 parent ead1c57 commit c26bf175ae686d4591e7f242bdf8d46c4d30acf4 @thedarkone committed
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/capistrano/recipes/deploy/strategy/utilities/copy.rb
View
5 lib/capistrano/recipes/deploy/strategy/utilities/copy.rb
@@ -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)

0 comments on commit c26bf17

Please sign in to comment.
Something went wrong with that request. Please try again.