bin/rconf in rconf-0.6.5 vs bin/rconf in rconf-0.6.10
- old
+ new
@@ -84,17 +84,23 @@
end
puts
end
exit 0
end
+ Profile.reset if options[:force]
ProgressReporter.report_to_stdout
ProgressReporter.report_to_file(options[:output]) if options[:output]
Command.set_verbose if options[:verbose]
begin
lang = Language.load(options[:config])
report_fatal("Validation of configuration file failed:\n -#{lang.validation_errors.join("\n -").map(&:red)}") unless lang.validation_errors.empty?
- Profile.reset if options[:force]
- Dir.chdir(File.dirname(options[:config])) { lang.configurators.each(&:run) }
+ Dir.chdir(File.dirname(options[:config])) do
+ lang.configurators.each do |c|
+ c.run
+ break if c.aborting
+ c.post_process
+ end
+ end
report("Successfully configured #{File.basename(options[:config], '.rc').blue} for #{Platform.family.to_s.blue}")
rescue Exception => e
raise if e.is_a?(SystemExit)
report_fatal("Execution failed with exception '#{e.message.red}'\n#{e.backtrace.join("\n").grey}")
ensure