Skip to content

Commit

Permalink
- don't use @excludes; just make it a local variable since the
Browse files Browse the repository at this point in the history
--exclude flag populates the attributes[:excludes] setting.
  • Loading branch information
jordansissel committed Apr 11, 2013
1 parent a07985f commit cfee4c7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/fpm/command.rb
Expand Up @@ -134,12 +134,14 @@ def help(*args)
"a name suffix to append to package and dependencies."
option ["-e", "--edit"], :flag,
"Edit the package spec before building.", :default => false

excludes = []
option ["-x", "--exclude"], "EXCLUDE_PATTERN",
"Exclude paths matching pattern (shell wildcard globs valid here). " \
"If you have multiple file patterns to exclude, specify this flag " \
"multiple times.", :attribute_name => :excludes do |val|
@excludes ||= []
@excludes << val
excludes << val
next excludes
end # -x / --exclude
option "--description", "DESCRIPTION", "Add a description for this package." \
" You can include '\n' sequences to indicate newline breaks.",
Expand Down Expand Up @@ -239,7 +241,6 @@ def initialize(*args)
@dependencies = []
@config_files = []
@directories = []
@excludes = []
end # def initialize

# Execute this command. See Clamp::Command#execute and Clamp's documentation
Expand Down

0 comments on commit cfee4c7

Please sign in to comment.