requiresInitialized static method

bool requiresInitialized(
  1. AppLogger log
)

Returns false and logs an error if not initialized. Use in commands to avoid duplicating the "Run init first" message.

Implementation

static bool requiresInitialized(AppLogger log) {
  if (!isInitialized()) {
    log.error('❌ Error: Project not initialized. Run "init" first.');
    return false;
  }
  return true;
}