From 0bb17dfa4b5a3cb05b36f1d4e5373c10e62dd465 Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Fri, 7 Jul 2023 14:24:27 +0530 Subject: linkhandler: better error management --- .local/bin/linkhandler | 4 ++++ 1 file changed, 4 insertions(+) (limited to '.local/bin') diff --git a/.local/bin/linkhandler b/.local/bin/linkhandler index 5fff65e..fb8d071 100755 --- a/.local/bin/linkhandler +++ b/.local/bin/linkhandler @@ -30,6 +30,10 @@ main() ;; *) if echo "$1" | grep -Eqx '^https?://[^/]*\.onion(/.*)?'; then + if ! command -v tor-browser > /dev/null; then + note "tor browser not installed" + exit 1 + fi exec tor-browser "$1" >/dev/null 2>&1 else exec "$BROWSER" "$1" >/dev/null 2>&1 -- cgit v1.2.3