lib/onyphe/cli.rb in onyphe-0.2.0 vs lib/onyphe/cli.rb in onyphe-0.2.1
- old
+ new
@@ -72,10 +72,14 @@
no_commands do
def with_error_handling
yield
rescue StandardError => e
- puts "Warning: #{e}"
+ if e.to_s == "'api_key' argument is required"
+ puts "Please set your API key as an environment variable `ONYPHE_API_KEY`"
+ else
+ puts "Warning: #{e}"
+ end
end
def api
@api ||= API.new
end