Commit a7cf1ca7352e2aff9e80449c2b94220616a5f4b2

Thomas de Grivel 2023-01-23T08:50:21

silent which

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/lib/shpkg.subr b/lib/shpkg.subr
index c411ff0..bf561ec 100644
--- a/lib/shpkg.subr
+++ b/lib/shpkg.subr
@@ -6,11 +6,11 @@ set -e
 # Config
 SHPKG_DIR="${SHPKG_DIR:-${HOME}/shpkg}"
 if [ "x${CC}" = "x" ]; then
-    if which cc; then
+    if which cc >/dev/null; then
         CC=cc
-    elif which gcc; then
+    elif which gcc >/dev/null; then
         CC=gcc
-    elif which egcc; then
+    elif which egcc >/dev/null; then
         CC=egcc
     else
         echo "C compiler not found." >&2