diff --git a/finder-to-ghostty/finder-to-ghostty.sh b/finder-to-ghostty/finder-to-ghostty.sh index b7a5fcc..cb27226 100755 --- a/finder-to-ghostty/finder-to-ghostty.sh +++ b/finder-to-ghostty/finder-to-ghostty.sh @@ -1,3 +1,11 @@ #!/bin/bash -open -a Ghostty "$FINDER_PATH" \ No newline at end of file +if [ -z "$FINDER_PATH" ]; then + echo "Error: FINDER_PATH environment variable is not set." >&2 + exit 1 +fi + +if ! open -a Ghostty "$FINDER_PATH"; then + echo "Failed to open Ghostty. Ensure Ghostty is installed and accessible." >&2 + exit 1 +fi