File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 11## 0.22.14
22
3+ - Fixes issue with local analysis without git repository root.
34- Accept ` logger ` in ` PackageAnalyzer.inspectDir ` method.
45
56## 0.22.13
Original file line number Diff line number Diff line change @@ -242,12 +242,14 @@ class PackageAnalyzer {
242242}
243243
244244Future <String ?> _detectGitRoot (String packageDir) async {
245- final pr = await runGitIsolated (
246- [ 'rev-parse' , '--show-toplevel' ],
247- workingDirectory : packageDir ,
248- );
249- if (pr.exitCode == 0 ) {
245+ try {
246+ final pr = await runGitIsolated (
247+ [ 'rev-parse' , '--show-toplevel' ] ,
248+ workingDirectory : packageDir,
249+ );
250250 return pr.stdout.asString.trim ();
251+ } on GitToolException catch (_) {
252+ // not in a git directory (or git is broken) - ignore exception
251253 }
252254 return null ;
253255}
You can’t perform that action at this time.
0 commit comments