bin/terraformer in terraform-exporter-0.0.2 vs bin/terraformer in terraform-exporter-0.0.3
- old
+ new
@@ -1,11 +1,16 @@
#!/usr/bin/env ruby
+require "terraformer"
-require "terraforming"
begin
Terraformer::CLI.start(ARGV)
-rescue Terraformer::UserInputError, Terraformer::UserInputMaxAttemptsError, Terraformer::TerraformInvalidTfstateFile, Terraformer::TerraformFileNotFound => e
- if e.class.is_a? Terraformer::UserInputError
+rescue Exception => exception
+ case exception
+ when Terraformer::UserInputError
exit 0
+ else
+ message = "[ERROR] #{exception.class.to_s}"
+ message += " => #{exception.message}" unless exception.message.strip.empty?
+ puts message
+ exit 1
end
- exit 1
end