Class: Ace::Git::Secrets::CLI::Commands::Revoke

Inherits:
Support::Cli::Command
  • Object
show all
Includes:
Support::Cli::Base
Defined in:
lib/ace/git/secrets/cli/commands/revoke.rb

Overview

ace-support-cli command for revoking tokens via provider APIs

Exit codes:

  • 0: Success (all tokens revoked)

  • 1: Partial success or failure

  • 2: Error occurred

Instance Method Summary collapse

Instance Method Details

#call(**options) ⇒ Object



28
29
30
31
32
33
34
35
36
37
38
# File 'lib/ace/git/secrets/cli/commands/revoke.rb', line 28

def call(**options)
  debug_log("Starting revoke with options: #{format_pairs(options)}", options)

  exit_code = Ace::Git::Secrets::Commands::RevokeCommand.execute(options)
  raise Ace::Support::Cli::Error.new("Revocation failed", exit_code: exit_code) if exit_code != 0
rescue Ace::Support::Cli::Error
  raise
rescue => e
  debug_log(e.full_message, options) if debug?(options)
  raise Ace::Support::Cli::Error.new(e.message, exit_code: 2)
end