You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Joe McDonnell (JIRA)" <ji...@apache.org> on 2018/06/11 20:54:00 UTC

[jira] [Created] (IMPALA-7159) impala-config.sh fails when running with set -euo pipefail if IMPALA_HOME is not set

Joe McDonnell created IMPALA-7159:
-------------------------------------

             Summary: impala-config.sh fails when running with set -euo pipefail if IMPALA_HOME is not set
                 Key: IMPALA-7159
                 URL: https://issues.apache.org/jira/browse/IMPALA-7159
             Project: IMPALA
          Issue Type: Bug
          Components: Infrastructure
    Affects Versions: Impala 2.13.0, Impala 3.1.0
            Reporter: Joe McDonnell


bin/impala-config.sh contain these two comments:

 
{noformat}
# Source this file from the $IMPALA_HOME directory to
# setup your environment. If $IMPALA_HOME is undefined
# this script will set it to the current working directory.
...
# This file must be kept compatible with bash options "set -euo pipefail".{noformat}
However, starting with a clean shell, the following fails:
{noformat}
cd ~/Impala
set -euo pipefail
source bin/impala-config.sh{noformat}
bin/impala-config.sh uses $IMPALA_HOME when IMPALA_HOME is unbound:
{noformat}
if ! [[ "'$IMPALA_HOME'" =~ [[:blank:]] ]]; then
  if [ -z "$IMPALA_HOME" ]; then
    if [[ ! -z "$ZSH_NAME" ]]; then
      export IMPALA_HOME=$(dirname "$(cd $(dirname ${(%):-%x}) >/dev/null && pwd)")
    else
      export IMPALA_HOME=$(dirname "$(cd $(dirname "${BASH_SOURCE[0]}") >/dev/null && pwd)")
    fi
  fi
fi{noformat}
It looks like this has been this way for a long time.

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org