NIFI-758 Defaulting to POSIX compliant single bracket test command in lieu of the Bash [[

This commit is contained in:
Aldrin Piri 2015-07-26 23:36:39 -04:00
parent c6d500b315
commit 13042dc2e9
1 changed files with 2 additions and 2 deletions

View File

@ -155,7 +155,7 @@ run() {
sudo_cmd_prefix="" sudo_cmd_prefix=""
if $cygwin; then if $cygwin; then
if [[ -n "$run_as" ]]; then if [ -n "$run_as" ]; then
echo "The run.as option is not supported in a Cygwin environment. Exiting." echo "The run.as option is not supported in a Cygwin environment. Exiting."
exit 1 exit 1
fi; fi;
@ -163,7 +163,7 @@ run() {
NIFI_HOME=`cygpath --path --windows "$NIFI_HOME"` NIFI_HOME=`cygpath --path --windows "$NIFI_HOME"`
BOOTSTRAP_CONF=`cygpath --path --windows "$BOOTSTRAP_CONF"` BOOTSTRAP_CONF=`cygpath --path --windows "$BOOTSTRAP_CONF"`
else else
if [[ -n "$run_as" ]]; then if [ -n "$run_as" ]; then
if id -u "$run_as" >/dev/null 2>&1; then if id -u "$run_as" >/dev/null 2>&1; then
sudo_cmd_prefix="sudo -u ${run_as}" sudo_cmd_prefix="sudo -u ${run_as}"
else else