ciFlutterLockPath function

String ciFlutterLockPath({
  1. required String repositoryRoot,
  2. String? workspaceRoot,
  3. Map<String, String>? environment,
})

The workspace flutter lock: override when set (TOM_FLUTTER_LOCK), else <workspace>/ztmp/flutter.lock, else — a repository checked out on its own — <repository>/ztmp/flutter.lock.

Implementation

String ciFlutterLockPath({
  required String repositoryRoot,
  String? workspaceRoot,
  Map<String, String>? environment,
}) {
  final env = environment ?? Platform.environment;
  final override = env['TOM_FLUTTER_LOCK'];
  if (override != null && override.isNotEmpty) return override;
  return p.join(workspaceRoot ?? repositoryRoot, 'ztmp', 'flutter.lock');
}