Skip to content

Commit

Permalink
Update packages command
Browse files Browse the repository at this point in the history
  • Loading branch information
gantoreno committed Jan 3, 2023
1 parent 7f5a156 commit 67fc961
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/descriptors.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <iostream>
#include <vector>
#include <string>

Expand Down Expand Up @@ -67,7 +68,9 @@ void* packages(string& out)
out = "Unknown";
}

out = exec("ls /usr/local/Cellar/* | grep ':' | wc -l | xargs") + " (brew)";


out = exec("ls /usr/local/Cellar/* 2> /dev/null | grep ':' | wc -l | xargs || echo '0'") + " (brew)";

return NULL;
}
Expand Down

0 comments on commit 67fc961

Please sign in to comment.