Skip to content

Commit

Permalink
Fix nil excludes error (rsync strategy) (#821)
Browse files Browse the repository at this point in the history
Co-authored-by: Yoseph Alabdulwahab <[email protected]>
  • Loading branch information
yosephsa and yalabdulwahab-cspire authored Sep 13, 2022
1 parent c99d264 commit 29d8a85
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/docker-sync/sync_strategy/rsync.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,9 @@ def sync

def sync_options
args = []
excludes_list = @options['sync_excludes'].append(Environment.default_ignores).flatten!

unless excludes_list.nil?
args = excludes_list.map { |pattern| "--exclude='#{pattern}'" } + args
unless @options['sync_excludes'].nil?
args = excludes_list.append(Environment.default_ignores).flatten!.map { |pattern| "--exclude='#{pattern}'" } + args
end
args.push('-ap')
args.push(@options['sync_args']) if @options.key?('sync_args')
Expand Down

0 comments on commit 29d8a85

Please sign in to comment.