mirror of
https://github.com/mastodon/mastodon
synced 2024-12-18 16:48:22 +09:00
cli: set exit_on_failure for all CLI classes (#9094)
This commit is contained in:
parent
8445f77a5b
commit
b9d7021c1b
@ -9,6 +9,10 @@ require_relative 'mastodon/settings_cli'
|
|||||||
|
|
||||||
module Mastodon
|
module Mastodon
|
||||||
class CLI < Thor
|
class CLI < Thor
|
||||||
|
def self.exit_on_failure?
|
||||||
|
true
|
||||||
|
end
|
||||||
|
|
||||||
desc 'media SUBCOMMAND ...ARGS', 'Manage media files'
|
desc 'media SUBCOMMAND ...ARGS', 'Manage media files'
|
||||||
subcommand 'media', Mastodon::MediaCLI
|
subcommand 'media', Mastodon::MediaCLI
|
||||||
|
|
||||||
|
@ -7,6 +7,9 @@ require_relative 'cli_helper'
|
|||||||
|
|
||||||
module Mastodon
|
module Mastodon
|
||||||
class AccountsCLI < Thor
|
class AccountsCLI < Thor
|
||||||
|
def self.exit_on_failure?
|
||||||
|
true
|
||||||
|
end
|
||||||
option :all, type: :boolean
|
option :all, type: :boolean
|
||||||
desc 'rotate [USERNAME]', 'Generate and broadcast new keys'
|
desc 'rotate [USERNAME]', 'Generate and broadcast new keys'
|
||||||
long_desc <<-LONG_DESC
|
long_desc <<-LONG_DESC
|
||||||
|
@ -7,6 +7,9 @@ require_relative 'cli_helper'
|
|||||||
|
|
||||||
module Mastodon
|
module Mastodon
|
||||||
class EmojiCLI < Thor
|
class EmojiCLI < Thor
|
||||||
|
def self.exit_on_failure?
|
||||||
|
true
|
||||||
|
end
|
||||||
option :prefix
|
option :prefix
|
||||||
option :suffix
|
option :suffix
|
||||||
option :overwrite, type: :boolean
|
option :overwrite, type: :boolean
|
||||||
|
@ -6,6 +6,9 @@ require_relative 'cli_helper'
|
|||||||
|
|
||||||
module Mastodon
|
module Mastodon
|
||||||
class FeedsCLI < Thor
|
class FeedsCLI < Thor
|
||||||
|
def self.exit_on_failure?
|
||||||
|
true
|
||||||
|
end
|
||||||
option :all, type: :boolean, default: false
|
option :all, type: :boolean, default: false
|
||||||
option :background, type: :boolean, default: false
|
option :background, type: :boolean, default: false
|
||||||
option :dry_run, type: :boolean, default: false
|
option :dry_run, type: :boolean, default: false
|
||||||
|
@ -6,6 +6,9 @@ require_relative 'cli_helper'
|
|||||||
|
|
||||||
module Mastodon
|
module Mastodon
|
||||||
class MediaCLI < Thor
|
class MediaCLI < Thor
|
||||||
|
def self.exit_on_failure?
|
||||||
|
true
|
||||||
|
end
|
||||||
option :days, type: :numeric, default: 7
|
option :days, type: :numeric, default: 7
|
||||||
option :background, type: :boolean, default: false
|
option :background, type: :boolean, default: false
|
||||||
option :verbose, type: :boolean, default: false
|
option :verbose, type: :boolean, default: false
|
||||||
|
@ -6,6 +6,9 @@ require_relative 'cli_helper'
|
|||||||
|
|
||||||
module Mastodon
|
module Mastodon
|
||||||
class RegistrationsCLI < Thor
|
class RegistrationsCLI < Thor
|
||||||
|
def self.exit_on_failure?
|
||||||
|
true
|
||||||
|
end
|
||||||
desc 'open', 'Open registrations'
|
desc 'open', 'Open registrations'
|
||||||
def open
|
def open
|
||||||
Setting.open_registrations = true
|
Setting.open_registrations = true
|
||||||
|
Loading…
Reference in New Issue
Block a user