requireCredentials function
Shared by every keys subcommand, including KeysRevokeSubcommand in
keys_revoke_command.dart — kept public (no leading underscore) so it's
importable across that file split.
Implementation
Credentials requireCredentials() {
final creds = Credentials.load();
if (creds == null) {
AppLogger.error(
'Not logged in. Run `appflight login` or set APPFLIGHT_API_KEY.',
);
exit(ExitCodes.noCredentials);
}
return creds;
}