Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working in Alfred 5 #17

Open
tonieerik opened this issue Oct 19, 2022 · 8 comments
Open

Not working in Alfred 5 #17

tonieerik opened this issue Oct 19, 2022 · 8 comments

Comments

@tonieerik
Copy link

Workflow is not working properly in Alfred 5 (I am using latest v5.0.3).

tw-error

@clnt
Copy link
Owner

clnt commented Nov 25, 2022

Hey @tonieerik

Thanks for reporting this, I had a feeling it may break when I saw the changelog notes for Alfred 5 as workflows have been re-worked quite a bit.

I am currently still using Alfred 4, however I will get in contact with the Alfred team to retain my key for Alfred 4 so I can ensure I am still able to update the v4 version of the workflow. As soon as I have a key for both v4 and v5 I shall upgrade mine, this means I will need to update the underlying PHP dependency this uses to interact with the workflows - it looks like that has been updated so hopefully it won't take too much to fix for Alfred v5 - famous last words!

I'll drop a response as soon as I have an update.

Cheers

@clnt clnt added Status: Pending Work to be scheduled Priority: High High priority issue labels Nov 25, 2022
@cowboyd
Copy link

cowboyd commented May 29, 2023

I am also seeing this behavior in Alfred 4.7

@erashdan
Copy link

+1

@clnt
Copy link
Owner

clnt commented Mar 7, 2024

Hi all,

I have just installed Alfred 5 (5.1.4) on macOS Sonoma and downloaded the latest workflow file available at https://github.com/clnt/alfred-tailwindcss-docs/releases/tag/v3.0.1

From my testing it seems to be working without any issues, the results won't be identical to those shown on the TailwindCSS website search but I am not able to reproduce the issue above of it not returning results:

alfred_font
alfred_flex_initial
tailwindcss_site_flex_initial

I am running PHP 8.3 locally in my CLI although it should still work on earlier versions as it was before.

If you are having any issues can you check that you are definitely using the latest release and have a valid PHP version (PHP 8.1+).

If you continue to have issues let me know if there are any system differences, check PHP version with php -v

@clnt clnt added Feedback Wanted and removed Status: Pending Work to be scheduled Priority: High High priority issue labels Mar 13, 2024
@littlegreenguy
Copy link

Hiya, I'm on a fresh install of Alfred 5.5, php 8.3 via laravel herd and macOs Somoma and I get the same issue as the OP.

@clnt
Copy link
Owner

clnt commented Oct 23, 2024

Hi @littlegreenguy

Thanks for the info! If I am to take a guess at what it might be as everything is working fine for me on Homebrew it would be the path to the PHP binary.

Laravel Herd installs the binaries within the herd directory which is in the user's home directory. I could update the scripts in the workflow to include ~/Herd/bin/php but would need to issue a new release which I am unable to do today.

As a fix I would suggest creating a symlink between your working binary and one of the locations supported by the scripts.

Here is a command which should symlink your Herd PHP binary to the /usr/local/bin/php location:

sudo ln -s ~/Herd/bin/php /usr/local/bin/php

The other supported paths are the following:

  • /opt/homebrew/bin/php
  • /usr/bin/php

@littlegreenguy
Copy link

littlegreenguy commented Oct 23, 2024 via email

@littlegreenguy
Copy link

littlegreenguy commented Oct 24, 2024

hiya, symlink didn't work for me, though I didn't try debugging (in theory, it SHOULD work). I realised I have a similar fix in for the laravel docs workflow. Indeed it was related to the php path. I have updated the workflow as follows:

if [ -f "/opt/homebrew/bin/php" ]; then
    /opt/homebrew/bin/php tailwindcss.php "{query}"
elif [ -f "/usr/local/bin/php" ]; then
    /usr/local/bin/php tailwindcss.php "{query}"
elif [ -f "/usr/bin/php" ]; then
    /usr/bin/php tailwindcss.php "{query}"
elif [ -L ~/Library/Application\ Support/Herd/bin/php ]; then
    ~/Library/Application\ Support/Herd/bin/php tailwindcss.php "{query}"
fi

and works great now. Hope this helps others. Thanks too for this workflow, really useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants