lib/thor-scmversion.rb in thor-scmversion-1.2.1 vs lib/thor-scmversion.rb in thor-scmversion-1.4.0

- old
+ new

@@ -22,11 +22,15 @@ say "Writing files: #{version_files.join(', ')}", :yellow write_version say "Tagged: #{current_version}", :green rescue => e say "Tagging #{current_version} failed due to error", :red - say e, :red - exit 1 + say e.to_s, :red + if e.respond_to? :status_code + exit e.status_code + else + exit 1 + end end end method_option :version_file_path, :type => :string,