Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions cli-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@
set -euo pipefail

# first arg is `-f` or `--some-option`
if [ "${1#-}" != "$1" ]; then
set -- wp "$@"
fi

# if our command is a valid wp-cli subcommand, let's invoke it through wp-cli instead
# or if our command is a valid wp-cli subcommand, let's invoke it through wp-cli instead
# (this allows for "docker run wordpress:cli help", etc)
if wp --path=/dev/null help "$1" > /dev/null 2>&1; then
if [ "${1#-}" != "$1" ] || wp help "$1" > /dev/null 2>&1; then
set -- wp "$@"
fi

Expand Down
8 changes: 2 additions & 6 deletions php7.2/cli/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@
set -euo pipefail

# first arg is `-f` or `--some-option`
if [ "${1#-}" != "$1" ]; then
set -- wp "$@"
fi

# if our command is a valid wp-cli subcommand, let's invoke it through wp-cli instead
# or if our command is a valid wp-cli subcommand, let's invoke it through wp-cli instead
# (this allows for "docker run wordpress:cli help", etc)
if wp --path=/dev/null help "$1" > /dev/null 2>&1; then
if [ "${1#-}" != "$1" ] || wp help "$1" > /dev/null 2>&1; then
set -- wp "$@"
fi

Expand Down
8 changes: 2 additions & 6 deletions php7.3/cli/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@
set -euo pipefail

# first arg is `-f` or `--some-option`
if [ "${1#-}" != "$1" ]; then
set -- wp "$@"
fi

# if our command is a valid wp-cli subcommand, let's invoke it through wp-cli instead
# or if our command is a valid wp-cli subcommand, let's invoke it through wp-cli instead
# (this allows for "docker run wordpress:cli help", etc)
if wp --path=/dev/null help "$1" > /dev/null 2>&1; then
if [ "${1#-}" != "$1" ] || wp help "$1" > /dev/null 2>&1; then
set -- wp "$@"
fi

Expand Down
8 changes: 2 additions & 6 deletions php7.4/cli/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@
set -euo pipefail

# first arg is `-f` or `--some-option`
if [ "${1#-}" != "$1" ]; then
set -- wp "$@"
fi

# if our command is a valid wp-cli subcommand, let's invoke it through wp-cli instead
# or if our command is a valid wp-cli subcommand, let's invoke it through wp-cli instead
# (this allows for "docker run wordpress:cli help", etc)
if wp --path=/dev/null help "$1" > /dev/null 2>&1; then
if [ "${1#-}" != "$1" ] || wp help "$1" > /dev/null 2>&1; then
set -- wp "$@"
fi

Expand Down