zsh-artisan icon indicating copy to clipboard operation
zsh-artisan copied to clipboard

Change behaviour when use docker or sail

Open suleymanozev opened this issue 2 years ago • 2 comments

Solves #14

suleymanozev avatar Jul 18 '22 00:07 suleymanozev

Thanks!

From reading the code and testing it, it looks like there is some inconsistency between Sail and regular Docker Compose.

If Sail is detected, it will always try to run it in the Sail container, even if it's not running (existing behaviour).

Otherwise, if Docker Compose is detected, it will only run the command inside the container if the container is running (new behaviour).

I think it would be good to keep these consistent.

Additionally, I'm wondering whether it's worth spitting out a warning if it runs the command outside of the container when Sail or Docker Compose are detected but not running?

jessarcher avatar Jul 19 '22 06:07 jessarcher

@jessarcher Can we have a flag like DISABLE_ARTISAN_SAIL ?

here:

if [ "$docker_compose_config_path" = '' || $DISABLE_ARTISAN_SAIL ]; then

and usage

DISABLE_ARTISAN_SAIL=true artisan

amrography avatar Feb 22 '24 08:02 amrography