pulse-outdated
pulse-outdated copied to clipboard
Environment PATH issues, that stops pulse from recording outdated packages
I had to edit the recorder from this:
$result = Process::run('composer outdated -D -f json');
To this:
$result = Process::run('export PATH=/opt/homebrew/bin:$PATH; export COMPOSER_HOME="$HOME/.config/composer"; composer outdated -D -f json');
Suggestion: maybe pass configurable options to allow add paths so the recorder can work in any environment, eg local, production or staging configurable options like so:
\AaronFrancis\Pulse\Outdated\Recorders\OutdatedRecorder::class => [
'paths' => [
'local' => '/opt/homebrew/bin:/usr/bin',
'production' => '/opt/homebrew/bin:/usr/bin',
'staging' => '/opt/homebrew/bin:/usr/bin',
],
],