lib/giblish/application.rb in giblish-0.4.0 vs lib/giblish/application.rb in giblish-0.5.2

- old
+ new

@@ -29,24 +29,25 @@ cmdline = CmdLineParser.new args Giblog.logger.debug { "cmd line args: #{cmdline.args}" } # Convert using given args + conv_error = false begin if cmdline.args[:gitRepoRoot] Giblog.logger.info { "User asked to parse a git repo" } gc = GitRepoConverter.new cmdline.args - gc.convert + conv_error = gc.convert else tc = FileTreeConverter.new cmdline.args - tc.convert + conv_error = tc.convert end Giblog.logger.info { "Giblish is done!" } - 0 rescue Exception => e log_error e - 1 + conv_error = true end + conv_error ? 1 : 0 end private def log_error(ex)