File tree 4 files changed +8
-24
lines changed 4 files changed +8
-24
lines changed Original file line number Diff line number Diff line change 2
2
set -euo pipefail
3
3
4
4
# 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
10
6
# (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
12
8
set -- wp " $@ "
13
9
fi
14
10
Original file line number Diff line number Diff line change 2
2
set -euo pipefail
3
3
4
4
# 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
10
6
# (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
12
8
set -- wp " $@ "
13
9
fi
14
10
Original file line number Diff line number Diff line change 2
2
set -euo pipefail
3
3
4
4
# 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
10
6
# (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
12
8
set -- wp " $@ "
13
9
fi
14
10
Original file line number Diff line number Diff line change 2
2
set -euo pipefail
3
3
4
4
# 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
10
6
# (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
12
8
set -- wp " $@ "
13
9
fi
14
10
You can’t perform that action at this time.
0 commit comments