diff options
author | elijah <elijah@riseup.net> | 2013-01-20 13:52:48 -0800 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2013-01-20 13:52:48 -0800 |
commit | 5ec0237fbb326f5602ee6f7d1cf9ed93c9ec58c6 (patch) | |
tree | df011afe7ae49f9064e624c49fcca6f4a42ddd4d /lib/leap_cli/commands/deploy.rb | |
parent | ba301b0c8d77ae2f455d3a2d736968c981b8c757 (diff) |
fix bug with rsync when leap command is run from other directories
Diffstat (limited to 'lib/leap_cli/commands/deploy.rb')
-rw-r--r-- | lib/leap_cli/commands/deploy.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/leap_cli/commands/deploy.rb b/lib/leap_cli/commands/deploy.rb index a7f6bc3..37901f4 100644 --- a/lib/leap_cli/commands/deploy.rb +++ b/lib/leap_cli/commands/deploy.rb @@ -88,6 +88,8 @@ module LeapCli end def calculate_includes_from_files(files) + return nil unless files and files.any? + # prepend '/' (kind of like ^ for rsync) includes = files.collect {|file| '/' + file} @@ -98,7 +100,7 @@ module LeapCli end end - # include all parent directories + # include all parent directories (required because of --exclude '*') includes.size.times do |i| path = File.dirname(includes[i]) while(path != '/') |