From 238e464ca1d2602e80d59b87076f74e075531c1f Mon Sep 17 00:00:00 2001 From: William Melody Date: Sun, 21 Jan 2024 20:10:56 -0800 Subject: [PATCH] Check for presence of `nc` before testing for version. --- nb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nb b/nb index 15c3052e5..ecdc7361b 100755 --- a/nb +++ b/nb @@ -9855,7 +9855,7 @@ __set_browse_server_tool() { if _command_exists "ncat" && _command_exists "env" then # ncat is present and system is POSIX NB_BROWSE_SERVER_TOOL="ncat" - elif nc --help &/dev/null + elif _command_exists "nc" && nc --help &/dev/null then # GNU nc / netcat is present NB_BROWSE_SERVER_TOOL="nc" elif [[ "${BASH_VERSINFO[0]}" -ge 5 ]] &&