lib/percy/cli/snapshot.rb in percy-cli-1.2.2 vs lib/percy/cli/snapshot.rb in percy-cli-1.2.3

- old
+ new

@@ -113,21 +113,23 @@ def find_root_paths(dir_path, options = {}) snapshots_regex = options[:snapshots_regex] || DEFAULT_SNAPSHOTS_REGEX file_paths = [] _find_files(dir_path).each do |path| + # Skip git files. + next if path.match(/\/\.git\//) # Skip files that don't match the snapshots_regex. next if !path.match(snapshots_regex) file_paths << path end file_paths end def find_resource_paths(dir_path) file_paths = [] _find_files(dir_path).each do |path| - # Skip dot files. - next if path.match(/\/\./) + # Skip git files. + next if path.match(/\/\.git\//) # Only include files with the above static extensions. next if !Percy::Cli::STATIC_RESOURCE_EXTENSIONS.include?(File.extname(path)) file_paths << path end