refactor: use explicit executable check for zk command

master
Hektor Misplon 2025-05-09 22:22:01 +02:00
parent e8962144e5
commit 37a05500bf
1 changed files with 2 additions and 2 deletions

View File

@ -11,10 +11,10 @@ read -p "Would you like open your zettelkasten? [y/N] " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
if command -v zk &>/dev/null; then
if [ -x "$(command -v zk)" ]; then
zk
else
echo "Error: 'zk' command not found"
echo "Error: 'zk' command not found or not executable"
exit 1
fi
fi