Skip to content
This repository was archived by the owner on Sep 3, 2024. It is now read-only.

Commit 96c4a4f

Browse files
Merge pull request #149 from TanmayPatil105/dpkg
Output of `dpkg -l` includes header information
2 parents 544b6ab + 4d51900 commit 96c4a4f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/fetch.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,8 @@ string getPackages()
380380
{
381381
Command::exec_async("dpkg -l"s, [&](auto c) {
382382
std::lock_guard<std::mutex> lock(mtx);
383-
if (c->getOutputLines() > 0)
384-
pkgs.push_back(rec{"dpkg"s, c->getOutputLines()});
383+
if (c->getOutputLines() > 5)
384+
pkgs.push_back(rec{"dpkg"s, c->getOutputLines() - 5});
385385
});
386386
}
387387
if (Path::of("/bin/snap"s).isExecutable())

0 commit comments

Comments
 (0)