lib/omnibus/cli/base.rb in omnibus-1.0.3 vs lib/omnibus/cli/base.rb in omnibus-1.0.4
- old
+ new
@@ -35,15 +35,19 @@
# Don't try to initialize the Omnibus project for help commands. current_task renamed to current_command in Thor 0.18.0
current_command = config[:current_command] ? config[:current_command].name : config[:current_task].name
return if current_command == "help"
- if path = @options[:path]
- if (config = @options[:config]) && File.exist?(@options[:config])
+ if config = @options[:config]
+ if config && File.exist?(@options[:config])
say("Using Omnibus configuration file #{config}", :green)
Omnibus.load_configuration(config)
+ elsif config
+ say("No configuration file `#{config}', using defaults", :yellow)
end
+ end
+ if path = @options[:path]
# TODO: merge in all relevant CLI options here, as they should
# override anything from a configuration file.
Omnibus::Config.project_root(path)
Omnibus::Config.append_timestamp(@options[:timestamp]) if @options.key?('timestamp')