Skip to content

Commit

Permalink
fix _gitIsClean check
Browse files Browse the repository at this point in the history
  • Loading branch information
jakemac53 committed Sep 24, 2024
1 parent 9bf9ec6 commit 27b880c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions _test/test/common/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,9 @@ Future<void> stopServer({bool? cleanUp}) async {
/// Checks whether the current git client is "clean" (no pending changes) for
/// this package directory.
bool _gitIsClean() {
var gitStatus = Process.runSync('git', ['status', '.']).stdout as String;
return gitStatus.contains('nothing to commit, working tree clean');
var gitStatus =
Process.runSync('git', ['status', '.', '--porcelain']).stdout as String;
return gitStatus.isEmpty;
}

/// Ensures that the current directory is a "clean" git client (no pending
Expand Down

0 comments on commit 27b880c

Please sign in to comment.