From 2f8f3c28f2ee2cb7806fbba54e21bd260629c502 Mon Sep 17 00:00:00 2001 From: Istvan Soos Date: Thu, 24 Oct 2024 15:55:26 +0200 Subject: [PATCH] remove == 0 check --- lib/src/package_analyzer.dart | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/src/package_analyzer.dart b/lib/src/package_analyzer.dart index 45c2fd563..f89b92d0c 100644 --- a/lib/src/package_analyzer.dart +++ b/lib/src/package_analyzer.dart @@ -247,9 +247,7 @@ Future _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 }