resolveStartupCubeSource function

String? resolveStartupCubeSource({
  1. String? flagConfigPath,
  2. String? flagName,
  3. CubeSettings? project,
  4. CubeSettings? user,
})

The startup cube source (fa_cube): explicit flags win, then the project cube: section, then the user cube: section — each config section applies only when enabled. Null = start unsandboxed.

Implementation

String? resolveStartupCubeSource({
  String? flagConfigPath,
  String? flagName,
  CubeSettings? project,
  CubeSettings? user,
}) {
  if (flagConfigPath != null) return flagConfigPath;
  if (flagName != null) return flagName;
  if (project != null && project.enabled) return project.configPath;
  if (user != null && user.enabled) return user.configPath;
  return null;
}