The default paths do not work for non-standard php installations.
Users can add or modify their PATH variable in Alfred per workflow, making non-standard php available.
In this pull request I am using which to find if PHP is available via PATH variable instead of just assuming it will be available in one of the standard paths. If which fails (exit code is not 0), then try to use one of the standard paths.
The default paths do not work for non-standard php installations.
Users can add or modify their PATH variable in Alfred per workflow, making non-standard php available.
In this pull request I am using
which
to find if PHP is available viaPATH
variable instead of just assuming it will be available in one of the standard paths. Ifwhich
fails (exit code is not0
), then try to use one of the standard paths.