From e77af9870e1841bbf54bbfead7fe542299abbac5 Mon Sep 17 00:00:00 2001 From: Jurgens du Toit Date: Thu, 28 Mar 2024 09:01:36 +0200 Subject: [PATCH] chore: Thor tweaks --- lib/ditty/cli.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/ditty/cli.rb b/lib/ditty/cli.rb index 67eae02..52c7163 100644 --- a/lib/ditty/cli.rb +++ b/lib/ditty/cli.rb @@ -25,7 +25,7 @@ class CLI < Thor register ::Ditty::Generators::MigrationGenerator, 'migration', 'migration NAME', 'Create a new Sequel migration' - default_task :server + default_task :help desc 'server', 'Start the Ditty server' require './application' if File.exist?('application.rb') @@ -58,6 +58,10 @@ def server Rack::Server.start(rack_opts) end + def self.exit_on_failure? + true + end + desc 'migrate', 'Run the Ditty migrations' def migrate # Prep Ditty