Skip to content

Commit 598769a

Browse files
authored
Merge pull request #387 from terencehonles/remove-cli-entrypoint-path-argument-to-load-plugins
remove --path argument so plugins are loaded
2 parents b112774 + c0d11ed commit 598769a

File tree

4 files changed

+8
-24
lines changed

4 files changed

+8
-24
lines changed

cli-entrypoint.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,9 @@
22
set -euo pipefail
33

44
# first arg is `-f` or `--some-option`
5-
if [ "${1#-}" != "$1" ]; then
6-
set -- wp "$@"
7-
fi
8-
9-
# if our command is a valid wp-cli subcommand, let's invoke it through wp-cli instead
5+
# or if our command is a valid wp-cli subcommand, let's invoke it through wp-cli instead
106
# (this allows for "docker run wordpress:cli help", etc)
11-
if wp --path=/dev/null help "$1" > /dev/null 2>&1; then
7+
if [ "${1#-}" != "$1" ] || wp help "$1" > /dev/null 2>&1; then
128
set -- wp "$@"
139
fi
1410

php7.2/cli/docker-entrypoint.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,9 @@
22
set -euo pipefail
33

44
# first arg is `-f` or `--some-option`
5-
if [ "${1#-}" != "$1" ]; then
6-
set -- wp "$@"
7-
fi
8-
9-
# if our command is a valid wp-cli subcommand, let's invoke it through wp-cli instead
5+
# or if our command is a valid wp-cli subcommand, let's invoke it through wp-cli instead
106
# (this allows for "docker run wordpress:cli help", etc)
11-
if wp --path=/dev/null help "$1" > /dev/null 2>&1; then
7+
if [ "${1#-}" != "$1" ] || wp help "$1" > /dev/null 2>&1; then
128
set -- wp "$@"
139
fi
1410

php7.3/cli/docker-entrypoint.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,9 @@
22
set -euo pipefail
33

44
# first arg is `-f` or `--some-option`
5-
if [ "${1#-}" != "$1" ]; then
6-
set -- wp "$@"
7-
fi
8-
9-
# if our command is a valid wp-cli subcommand, let's invoke it through wp-cli instead
5+
# or if our command is a valid wp-cli subcommand, let's invoke it through wp-cli instead
106
# (this allows for "docker run wordpress:cli help", etc)
11-
if wp --path=/dev/null help "$1" > /dev/null 2>&1; then
7+
if [ "${1#-}" != "$1" ] || wp help "$1" > /dev/null 2>&1; then
128
set -- wp "$@"
139
fi
1410

php7.4/cli/docker-entrypoint.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,9 @@
22
set -euo pipefail
33

44
# first arg is `-f` or `--some-option`
5-
if [ "${1#-}" != "$1" ]; then
6-
set -- wp "$@"
7-
fi
8-
9-
# if our command is a valid wp-cli subcommand, let's invoke it through wp-cli instead
5+
# or if our command is a valid wp-cli subcommand, let's invoke it through wp-cli instead
106
# (this allows for "docker run wordpress:cli help", etc)
11-
if wp --path=/dev/null help "$1" > /dev/null 2>&1; then
7+
if [ "${1#-}" != "$1" ] || wp help "$1" > /dev/null 2>&1; then
128
set -- wp "$@"
139
fi
1410

0 commit comments

Comments
 (0)