lib/vindetta/cli.rb in vindetta-0.11.0 vs lib/vindetta/cli.rb in vindetta-0.12.0
- old
+ new
@@ -25,10 +25,12 @@
end
desc "Decodes a VIN"
command %i[decode d] do |c|
c.action do |_global, _options, _args|
- vin = STDIN.gets.chomp || _args.first
+ vin = _args.first
+
+ exit_now!("vin is required") if vin.nil?
puts Vindetta::Decoder.decode_vin(vin).to_json
end
end