class Rails::Command::CredentialsCommand

def edit

def edit
  extract_environment_option_from_argument(default_environment: nil)
  require_application!
  ensure_editor_available(command: "bin/rails credentials:edit") || (return)
  ensure_encryption_key_has_been_added if credentials.key.nil?
  ensure_credentials_have_been_added
  ensure_diffing_driver_is_configured
  catch_editing_exceptions do
    change_credentials_in_system_editor
  end
  say "File encrypted and saved."
rescue ActiveSupport::MessageEncryptor::InvalidMessage
  say "Couldn't decrypt #{content_path}. Perhaps you passed the wrong key?"
end