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 1
1
## 0.22.14
2
2
3
+ - Fixes issue with local analysis without git repository root.
3
4
- Accept ` logger ` in ` PackageAnalyzer.inspectDir ` method.
4
5
5
6
## 0.22.13
Original file line number Diff line number Diff line change @@ -242,12 +242,14 @@ class PackageAnalyzer {
242
242
}
243
243
244
244
Future <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
+ );
250
250
return pr.stdout.asString.trim ();
251
+ } on GitToolException catch (_) {
252
+ // not in a git directory (or git is broken) - ignore exception
251
253
}
252
254
return null ;
253
255
}
You can’t perform that action at this time.
0 commit comments