Skip to content

Commit

Permalink
refactor: use separate ci package for CI environment detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Salakar committed Mar 30, 2022
1 parent a88ade1 commit d992143
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/flutterfire_cli/lib/src/common/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import 'dart:io';
import 'package:ansi_styles/ansi_styles.dart';
import 'package:ci/ci.dart' as ci;
import 'package:interact/interact.dart' as interact;
import 'package:path/path.dart' show relative, normalize, windows, joinAll;
import 'platform.dart';
Expand Down Expand Up @@ -48,11 +49,7 @@ extension Let<T> on T? {
}

bool get isCI {
final keys = currentPlatform.environment.keys;
return keys.contains('CI') ||
keys.contains('CONTINUOUS_INTEGRATION') ||
keys.contains('BUILD_NUMBER') ||
keys.contains('RUN_ID');
return ci.isCI;
}

int get terminalWidth {
Expand Down
1 change: 1 addition & 0 deletions packages/flutterfire_cli/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ environment:
dependencies:
ansi_styles: ^0.3.0
args: ^2.3.0
ci: ^0.1.0
cli_util: ^0.3.5
deep_pick: ^0.10.0
file: ^6.1.2
Expand Down

0 comments on commit d992143

Please sign in to comment.