pulse-outdated icon indicating copy to clipboard operation
pulse-outdated copied to clipboard

Environment PATH issues, that stops pulse from recording outdated packages

Open faraweilyas opened this issue 5 months ago • 0 comments

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',
            ],
        ],

faraweilyas avatar Sep 14 '24 22:09 faraweilyas