diff --git a/src/descriptors.cpp b/src/descriptors.cpp index 06a745b..b9bc9a1 100644 --- a/src/descriptors.cpp +++ b/src/descriptors.cpp @@ -1,3 +1,4 @@ +#include #include #include @@ -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; }