Skip to content

Commit

Permalink
Assume default config is located at config/pitchfork.rb
Browse files Browse the repository at this point in the history
Fix: #146
  • Loading branch information
byroot committed Nov 12, 2024
1 parent 296cb66 commit 935f0ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Unreleased

- Assume config file is located at `config/pitchfork.rb` if `-c` argument isn't provided.

# 0.16.0

- Use `exit!` for exiting the middle process when forking a new worker or mold.
Expand Down
2 changes: 1 addition & 1 deletion lib/pitchfork/configurator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class Configurator
def initialize(defaults = {}) #:nodoc:
self.set = Hash.new(:unset)
@use_defaults = defaults.delete(:use_defaults)
self.config_file = defaults.delete(:config_file)
self.config_file = defaults.delete(:config_file) { "config/pitchfork.rb" if File.exist?("config/pitchfork.rb") }

set.merge!(DEFAULTS) if @use_defaults
defaults.each { |key, value| self.__send__(key, value) }
Expand Down

0 comments on commit 935f0ef

Please sign in to comment.