Thor reference
11 March 2022 (Updated 11 March 2022)
On this page
What is Thor?
Thor is a Ruby gem that helps you build command-line utilities. It’s used in projects like Rails, Bundler, and Vagrant.
Recipes
Catch exceptions
Wrap the CLI.start
call in a begin/rescue block. Something like:
#!/usr/bin/env ruby
require 'sajad/cli'
begin
Sajad::CLI.start
rescue Sajad::ConfigError => e
$stderr.puts e.message
end
Sources
Tagged:
Ruby tooling
Thanks for your comment 🙏. Once it's approved, it will appear here.
Leave a comment