Skip to content

Commit

Permalink
Replicate usage the Unison 'Name' prefix for default ignores in nativ…
Browse files Browse the repository at this point in the history
…e_osx strategy (#822)
  • Loading branch information
zessx authored Sep 14, 2022
1 parent 40c759d commit 1373cdf
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/docker-sync/sync_strategy/native_osx.rb
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,16 @@ def expand_ignore_strings
exclude_type = @options['sync_excludes_type']
end

# use the 'Name' exclude type for all default ignores
# to prevent conflicts with the sync_excludes_type settings
unless Environment.default_ignores.nil?
expanded_ignore_strings = Environment.default_ignores.map do |pattern|
"-ignore='Name #{pattern}'"
end
end

unless @options['sync_excludes'].nil?
expanded_ignore_strings = @options['sync_excludes'].append(Environment.default_ignores).flatten!.map do |pattern|
expanded_ignore_strings = @options['sync_excludes'].map do |pattern|
if exclude_type == 'none'
# the ignore type like Name / Path are part of the pattern
ignore_string = "#{pattern}"
Expand Down

0 comments on commit 1373cdf

Please sign in to comment.