Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

- style fix

  • Loading branch information...
commit 173a2fa316023cc5146adfee12f78e5bb9166056 1 parent fb5955e
@jordansissel authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/fpm/command.rb
View
4 lib/fpm/command.rb
@@ -487,14 +487,14 @@ def validate
mandatory(@command.input_type == "dir", "--inputs is only valid with -s dir")
end
- mandatory(@command.args.any?,
+ mandatory(@command.args.any? or @command.inputs,
@r4um Collaborator
r4um added a note

This is causing syntax error.

$ bundle exec fpm --help
/home/cpk/.rvm/gems/ruby-1.9.3-p327/gems/backports-2.6.2/lib/backports/tools.rb:314:in `require': /home/cpk/src/ruby/fpm/lib/fpm/command.rb:490: syntax error, unexpected keyword_or, expecting ')' (SyntaxError)
      mandatory(@command.args.any? or @command.inputs,
                                     ^
/home/cpk/src/ruby/fpm/lib/fpm/command.rb:497: syntax error, unexpected ')', expecting tCOLON2 or '[' or '.'
/home/cpk/src/ruby/fpm/lib/fpm/command.rb:513: syntax error, unexpected $end, expecting keyword_end
    from /home/cpk/.rvm/gems/ruby-1.9.3-p327/gems/backports-2.6.2/lib/backports/tools.rb:314:in `require_with_backports'
    from /home/cpk/src/ruby/fpm/bin/fpm:6:in `<top (required)>'
    from /home/cpk/.rvm/gems/ruby-1.9.3-p327/bin/fpm:23:in `load'
    from /home/cpk/.rvm/gems/ruby-1.9.3-p327/bin/fpm:23:in `<main>'

Should be

mandatory((@commands.args.any? or @command.inputs),
@jordansissel Owner

yeah I had a fix but didn't commit it earlier today. I use || now instead of 'or' - not sure why I used 'or' - never ever ever ever use 'or' in ruby, it's awful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
"No parameters given. You need to pass additional command " \
"arguments so that I know what you want to build packages " \
"from. For example, for '-s dir' you would pass a list of " \
"files and directories. For '-s gem' you would pass a one" \
" or more gems to package from. As a full example, this " \
"will make an rpm of the 'json' rubygem: " \
- "`fpm -s gem -t rpm json`") unless @command.input_type == "dir" and @command.inputs
+ "`fpm -s gem -t rpm json`")
end # def validate
def mandatory(value, message)
Please sign in to comment.
Something went wrong with that request. Please try again.