Skip to content

Commit

Permalink
fix: Ignore empty results on root installed apps listing
Browse files Browse the repository at this point in the history
  • Loading branch information
ponces committed Sep 18, 2022
1 parent ae801a2 commit d0fb6ac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/services/root_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ class RootAPI {
cmd: 'ls "$_managerDirPath"',
);
if (res != null) {
return res.split('\n').map((pack) => pack.trim()).toList();
List<String> apps = res.split('\n');
apps.removeWhere((pack) => pack.isEmpty);
return apps.map((pack) => pack.trim()).toList();
}
} on Exception {
return List.empty();
Expand Down

0 comments on commit d0fb6ac

Please sign in to comment.