From c294c7fa3f54e278b5a256bea51db71d45b0d3cf Mon Sep 17 00:00:00 2001 From: Andrew Minion Date: Fri, 12 Nov 2021 13:33:52 -0600 Subject: [PATCH] =?UTF-8?q?use=20php=20from=20the=20user=E2=80=99s=20path?= =?UTF-8?q?=20(#22)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * use php from the user’s path Possible fix for #20 * test various php paths Possible solution to #20 * use {query} Seehttps://github.com/tillkruss/alfred-laravel-docs/pull/22#pullrequestreview-800530199 and following --- info.plist | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/info.plist b/info.plist index 2162dd2..e47d71b 100644 --- a/info.plist +++ b/info.plist @@ -79,9 +79,15 @@ runningsubtext Searching docs for "{query}"... script - /opt/homebrew/bin/php laravel.php "$1" + if [ -f "/opt/homebrew/bin/php" ]; then + /opt/homebrew/bin/php laravel.php "{query}" +elif [ -f "/usr/local/bin/php" ]; then + /usr/local/bin/php laravel.php "{query}" +elif [ -f "/usr/bin/php" ]; then + /usr/bin/php laravel.php "{query}" +fi scriptargtype - 1 + 0 scriptfile subtext