lib/posthaven_theme/cli.rb in posthaven_theme-0.1.0 vs lib/posthaven_theme/cli.rb in posthaven_theme-0.1.1
- old
+ new
@@ -31,10 +31,11 @@
TIMEFORMAT = "%H:%M:%S"
NON_CONFIG_COMMANDS = %w{help configure systeminfo}
def initialize(args = [], local_options = {}, config = {})
- unless NON_CONFIG_COMMANDS.include?(config[:current_command].name)
+ command = config[:current_command] || config[:current_task]
+ if command && !NON_CONFIG_COMMANDS.include?(command.name)
setup_config
validate_config!
end
super
end