bobthecow/psysh

Stop PsySH From using local version in project

michaelbutler opened this issue · 2 comments

This looks like a recent change: I have PsySH installed globally $HOME/.config/composer/vendor/bin/psysh. I have $HOME/.config/composer/vendor/bin in my $PATH. So far, so good.

However I also have a project that uses PsySH which some customizations. Let's say I'm in ~/source/myproject and I run psysh. I want the global psysh to run, which it does, however PsySH will detect what DIR I'm in and look if there is a psysh installed there, and it will end up using that one with the customizations. However I don't want that, because the customizations are designed for a remote server not my local machine.

When this happens, I see:
Using local PsySH version at /run/media/mbutler/SsdHome/source/myproject
and then it exits immediately because this local psysh has some customizations that just exit or error when not on the remote server.

How can I force psysh to run the global version without doing any autodetection? I didn't see any config value for this.

This looks like a recent change

That functionality landed in 51bc71d, so not toooo recent 😛

How would you expect an override to work? Alternatively, could you set up your configuration so it does the right thing and doesn't exit or error?

I suppose I could get it working locally, yeah. at one point it did.

How would you expect an override to work?

I'd take anything really. An ENV variable check so I could set up my own alias so that this auto loading doesn't occur. I'm going to close this though.