Skip to content
This repository has been archived by the owner on Oct 7, 2022. It is now read-only.

fix escaping of exclude arg #35

Open
wants to merge 2 commits into
base: 0.3.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/piculet
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ ARGV.options do |opt|
# Remap groups to exclude to regular expressions (if they're surrounded by '/')
if options[:exclude_sgs]
options[:exclude_sgs].map! do |name|
name =~ /\A\/(.*)\/\z/ ? Regexp.new($1) : Regexp.new("\A#{Regexp.escape(name)}\z")
name =~ /\A\/(.*)\/\z/ ? Regexp.new($1) : Regexp.new('\A' + Regexp.escape(name) + '\z')
end
end

Expand Down