Skip to content

Commit

Permalink
remove == 0 check
Browse files Browse the repository at this point in the history
  • Loading branch information
isoos committed Oct 24, 2024
1 parent 6e09fb4 commit 2f8f3c2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/src/package_analyzer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,7 @@ Future<String?> _detectGitRoot(String packageDir) async {
['rev-parse', '--show-toplevel'],
workingDirectory: packageDir,
);
if (pr.exitCode == 0) {
return pr.stdout.asString.trim();
}
return pr.stdout.asString.trim();
} on GitToolException catch (_) {
// not in a git directory (or git is broken) - ignore exception
}
Expand Down

0 comments on commit 2f8f3c2

Please sign in to comment.