Skip to content

Commit

Permalink
Merge pull request #118 from Earlopain/cli-stuff
Browse files Browse the repository at this point in the history
Fix `--help` and `--version` reporting unicorn values
  • Loading branch information
casperisfine committed May 9, 2024
2 parents f693b46 + d567b60 commit 8011260
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions exe/pitchfork
Expand Up @@ -64,19 +64,19 @@ op = OptionParser.new("", 24, ' ') do |opts|
warn "-s/--server only exists for compatibility with rackup"
end

# Unicorn-specific stuff
# Pitchfork-specific stuff
opts.on("-l", "--listen {HOST:PORT|PATH}",
"listen on HOST:PORT or PATH",
"this may be specified multiple times",
"(default: #{Pitchfork::Const::DEFAULT_LISTEN})") do |address|
options[:listeners] << address
end

opts.on("-c", "--config-file FILE", "Unicorn-specific config file") do |f|
opts.on("-c", "--config-file FILE", "Pitchfork-specific config file") do |f|
options[:config_file] = f
end

# I'm avoiding Unicorn-specific config options on the command-line.
# I'm avoiding Pitchfork-specific config options on the command-line.
# IMNSHO, config options on the command-line are redundant given
# config files and make things unnecessarily complicated with multiple
# places to look for a config option.
Expand All @@ -89,7 +89,7 @@ op = OptionParser.new("", 24, ' ') do |opts|
end

opts.on_tail("-v", "--version", "Show version") do
puts "#{cmd} v#{Pitchfork::Const::UNICORN_VERSION}"
puts "#{cmd} v#{Pitchfork::VERSION} (based on Unicorn v#{Pitchfork::Const::UNICORN_VERSION})"
exit
end

Expand Down

0 comments on commit 8011260

Please sign in to comment.