Module: kamailio Branch: 5.6 Commit: 614071020f123263b6e0c0cace652f88ac40f470 URL: https://github.com/kamailio/kamailio/commit/614071020f123263b6e0c0cace652f88...
Author: POIROTTE Francois francois.poirotte@csgroup.eu Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2023-02-24T13:56:26+01:00
kamctl: hide errors raised by "which"
Hide error messages from "which" to avoid polluting kamctl's output (e.g. when a JSON document is returned) in environments where STDOUT and STDERR may be combined into a single stream (e.g. containers)
(cherry picked from commit a229d230bca5e785670edc3901f849e93989f9fe)
---
Modified: utils/kamctl/kamctl.base
---
Diff: https://github.com/kamailio/kamailio/commit/614071020f123263b6e0c0cace652f88... Patch: https://github.com/kamailio/kamailio/commit/614071020f123263b6e0c0cace652f88...
---
diff --git a/utils/kamctl/kamctl.base b/utils/kamctl/kamctl.base index f3b9e1f6670..164a867bd9b 100644 --- a/utils/kamctl/kamctl.base +++ b/utils/kamctl/kamctl.base @@ -10,7 +10,7 @@ locate_tool() { while [ -n "$1" ] do if [ -x /usr/bin/which ] ; then - TOOLPATH=`which $1` + TOOLPATH=`which $1 2> /dev/null` if [ -n "$TOOLPATH" ]; then return fi