willfarrell/alfred-pkgman-workflow

MacOS 12 doesn't work.

chooin opened this issue · 5 comments

[01:41:29.436] Logging Started...
[01:41:35.550] Package Managers[Script Filter] Queuing argument ''
[01:41:35.556] Package Managers[Script Filter] Script with argv '(null)' finished
[01:41:35.556] ERROR: Package Managers[Script Filter] Code 127: /bin/bash: php: command not found

@chooin it would seem that macOS Monterey doesn’t come with a copy of PHP installed.

You’ll want to install PHP yourself, I recommend using Homebrew to do that, it’s available at https://brew.sh.

Once you have Homebrew installed, you can brew install php and the workflow should work.

image

I have already installed php,but it doesn't work.

On another alfred package someone submitted the PR giving steps to resolve: https://github.com/willfarrell/alfred-encode-decode-workflow#macos-monterey-120-compatibility

To Solve this issue, follow these steps:

1. Install Homebrew with the command provided on its homepage
2. Install PHP runtime with Homebrew
  brew install php
3. Head to setting page of this Alfred workflow, double-click on encode / decode block, and change php to /usr/local/bin/php.

Hi,
After fixing missing php and changing to use /usr/local/bin/php, now I get this error:

[09:00:22.365] ERROR: Package Managers[Script Filter] Code 254: PHP Parse error:  syntax error, unexpected '/' in Command line code on line 1
[09:00:22.365] Package Managers[Script Filter] Parse error: syntax error, unexpected '/' in Command line code on line 1
[09:00:22.366] ERROR: Package Managers[Script Filter] JSON error: JSON text did not start with array or object and option to allow fragments not set. around line 1, column 0. in JSON:
Parse error: syntax error, unexpected '/' in Command line code on line 1

Right now I am using php7.4, I also tried with php8.0. Any help is appreciated 😊