jordansissel/fpm · error
All flags should be before the first argument (stray flags f
Error message
All flags should be before the first argument (stray flags found: #{stray_flags} What it means
Error "All flags should be before the first argument (stray flags found: #{stray_flags}" thrown in jordansissel/fpm.
Source
Thrown at lib/fpm/command.rb:291
@conflicts = []
@replaces = []
@provides = []
@dependencies = []
@config_files = []
@directories = []
end # def initialize
# Execute this command. See Clamp::Command#execute and Clamp's documentation
def execute
logger.level = :warn
logger.level = :info if verbose? # --verbose
logger.level = :debug if debug? # --debug
if log_level
logger.level = log_level.to_sym
end
if (stray_flags = args.grep(/^-/); stray_flags.any?)
logger.warn("All flags should be before the first argument " \
"(stray flags found: #{stray_flags}")
end
# Some older behavior, if you specify:
# 'fpm -s dir -t ... -C somepath'
# fpm would assume you meant to add '.' to the end of the commandline.
# Let's hack that. https://github.com/jordansissel/fpm/issues/187
if input_type == "dir" and args.empty? and !chdir.nil?
logger.info("No args, but -s dir and -C are given, assuming '.' as input")
args << "."
end
if !File.exist?(workdir)
logger.fatal("Given --workdir=#{workdir} is not a path that exists.")
raise FPM::Package::InvalidArgument, "The given workdir '#{workdir}' does not exist."
end
if !File.directory?(workdir)
logger.fatal("Given --workdir=#{workdir} must be a directory")View on GitHub (pinned to b6d77ba72a)
When it happens
Trigger: Thrown at lib/fpm/command.rb:291 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of jordansissel/fpm@b6d77ba72a (2026-08-21).
Data as JSON: /api/errors/ae9117eff7a227af.
Report an issue: GitHub.