summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsinanmohd <sinan@firemail.cc>2023-07-07 14:24:27 +0530
committernazu <nazu@Nazers-MacBook-Pro.local>2023-07-08 10:59:27 +0400
commit0bb17dfa4b5a3cb05b36f1d4e5373c10e62dd465 (patch)
tree86ed99ed2262275ce315b2bcb456fda7ed4815f7
parent6cd1efca8c46239d0a28096de848a6dc0ac9a0ef (diff)
linkhandler: better error management
-rwxr-xr-x.local/bin/linkhandler4
1 files changed, 4 insertions, 0 deletions
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