Skip to content

Commit fda7347

Browse files
authored
[1.x] Fixes docker-compose not found in non-bash shells (#364)
* Fixes docker-compose not found in non-bash shells * Remove a stray "!"
1 parent f69380f commit fda7347

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

bin/sail

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
#!/usr/bin/env bash
22

3-
if ! [ -x "$(command -v docker-compose)" ]; then
4-
shopt -s expand_aliases
5-
alias docker-compose='docker compose'
6-
fi
7-
83
UNAMEOUT="$(uname -s)"
94

105
# Verify operating system is supported...
@@ -143,7 +138,11 @@ function sail_is_not_running {
143138
}
144139

145140
# Define Docker Compose command prefix...
146-
DOCKER_COMPOSE=(docker-compose)
141+
if [ -x "$(command -v docker-compose)" ]; then
142+
DOCKER_COMPOSE=(docker-compose)
143+
else
144+
DOCKER_COMPOSE=(docker compose)
145+
fi
147146

148147
if [ -n "$SAIL_FILES" ]; then
149148
# Convert SAIL_FILES to an array...

0 commit comments

Comments
 (0)