zsh-artisan
zsh-artisan copied to clipboard
Change behaviour when use docker or sail
Solves #14
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 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